Re: [问题] 关于副本错误。

楼主: laechan (挥泪斩马云)   2015-02-22 23:57:18
※ 引述《hlead (希多)》之铭言:
: 副本加载中......ok!
: 执行时段错误: *result of array addition is greater than maximum array size.
就字面上来说就某个 array 在做像是 += 的动作时它判断到 size
超过上限值设定.
它有时并不是单指像是以 mixed 来宣告的变量。(但大部份是)
: 程式: /std/new_ob/instance/instance_rooms.c:203
: 物件: /std/new_ob/instance/instance_rooms
: /std/user#6659561 "cmd_hook" /std/user.c:140
: /cmds/std/_instance "cmd_instance" /cmds/std/_instance.c:175
: /adm/obj/simul_efun "questing"
: /adm/simul_efun/pri_cmds.c(/adm/obj/simul_efun.c):358
: /open/cmds/quest/quest_data/quest_data "quested"
: /open/cmds/quest/quest_data/quest_data.c:718
: /std/new_ob/instance/ppl_area/ina_tiger "create_instance"
: /std/new_ob/instance/instance_ob.c:556
: /std/new_ob/instance/instance_rooms "ppl_instance"
: /std/new_ob/instance/instance_rooms.c:203
: 副本好像最近一直会跳这错误...导致都进不去。...
/std/new_ob/instance/instance_rooms.c:203
varargs mapping ppl_instance()
{
.
.
case "set":
ppl_instance[ppl_name]=setting_data;
tmps=keys(ppl_instance[ppl_name]);
foreach(tmp in tmps)
if(tmp[0..0]!="#" && ob=ppl_instance[ppl_name][tmp])
heart_beat_obs+=({ob}); <= 这行
break;
用 running 去跑
obs="/std/new_ob/instance/instance_rooms"->heart_beat_obs_func("query");
write("sizeof(obs)="+sizeof(obs)+"\n");
========== 程式执行区 ==========
sizeof(obs)=34235
========== 程式执行区 ==========
可以发现 size 的确很大,而且是执行完心跳函数的房间判断后
还是那么大,代表它有些房间并没有清掉:
j=sizeof(heart_beat_obs);
for(i=0;i<j;i++)
{
if(!ob=heart_beat_obs[i]) continue;
else if(!ob->query("already_init")) continue;
else if(ob->query("already_ended"))
{
heart_beat_obs[i]=0;
嘛......应该是上面那行。
[/std/new_ob/instance_room#7994907 ]
[副本]天蝎洞
这里是天蝎洞, 圣殿兰卡大陆上著名的危险地域之一, 每天都有
贪图洞里财宝的冒险者与盗贼进入, 但是出来的人却永远比进去
的人少, 里头除了财宝多之外, 尸体也多.
明显出口有: east.
100% 110% 100% > da here
Object : 房间(/std/new_ob/instance_room)
already_init :1
instance_diff :"hard1"
instance_file :"/u/l/laechan/area/scorpion/room/001"
因为所有的副本房间都有 init 函数,所以只要在这个函数里面
加上适当的判断即可。
系统已重开,明天大概中午左右我再看情况有无改善。
Laechan

Links booklink

Contact Us: admin [ a t ] ucptt.com