量太多因此独立一篇。
执行时段错误: *result of array addition is greater than maximum array size.
程式: /adm/simul_efun/prop_logic.c(/adm/obj/simul_efun.c):84
物件: /adm/obj/simul_efun
/std/user#537156 "cmd_hook" /std/user.c:140
/cmds/std/_wear "cmd_wear" /cmds/std/_wear.c:64
/cmds/std/_wear "try_wield_one" /cmds/std/_wear.c:424
/cmds/std/_wear "wear_it" /cmds/std/_wear.c:89
/d/ppl/quest/memory/wp/moonsword#537423 "add" /std/ob/object.c:37
/adm/obj/simul_efun "_add"
/adm/simul_efun/prop_logic.c(/adm/obj/simul_efun.c):84
_wear.c 的 89 行大概是
if(ob->query("type"))
ob->add("id",({ob->query("type")}));
而 result of array addition is greater than maximum array size.
我猜它的意思是线上有物件的 id 字段 size 数超过。
这很容易理解,如果玩家一直穿脱 id 自然一直肥大。
wear 那两行我暂时 abort 掉。调查的 running code 如下
obs=objects();
foreach(ob in obs)
if(!undefinedp(ob->query("id")))
if(sizeof(ob->query("id"))>10)
environment(ob) ? write(identify(ob)+" "+identify(environment(ob))+
" "+sizeof(ob->query("id"))+"\n")
: write(identify(ob)+" "+sizeof(ob->query("id"))+"\n");
========== 程式执行区 ==========
武器(幻月剑 /d/ppl/quest/memory/wp/moonsword) 玩家(konrad /std/user) 50000
防具(/std/new_ob/arm) 玩家(ick /std/user) 38
防具(/std/new_ob/arm) 玩家(cococd /std/user) 16
.
.
大概是像这样。之前就稍微有发现未鉴定防具的 id 有奇怪的不寻常
增长现象,然后理论上 id 有可能是储存资料,所以最近会做一下线
上 id 的修正。
=============================================================================
Expected: object Got: 0.
程式: /std/mob/g_attack.c:19
物件: /d/ppl/quest/memory/mob/novice#837674
生物名: novice
/std/user#8555 "heart_beat" /std/user.c:617
/std/user#8555 "continue_attack" /std/user.c:253
/adm/daemons/user_d "continue_attack" /adm/daemons/user_d.c:886
/adm/daemons/user_d "execute_attack" /adm/daemons/user_d.c:1014
/adm/daemons/user_d "normal_attack" /adm/daemons/user_d.c:1230
/adm/obj/simul_efun "show"
/adm/simul_efun/show.c(/adm/obj/simul_efun.c):248
/d/ppl/quest/memory/mob/novice#837674 "receive_damage"
/std/mob/g_attack.c:19
user_d.c 第 1230 行大概是
if(!me->query("record_data/no_enable_msg")) // Norr@Sanc in 2011/08/06
{
if(uu>0)
show(me,tar,(k>1 ? "["+k+" 连击] " : "")+tmp+"("+(t2/15)+")",t2);
else
show(me,tar,(k>1 ? "["+k+" 连击] " : "")+tmp+"("+t2+")",t2,
(int)tar->query("member"));
会出现 object got 0 就是说 me 或 tar 不见,照判断是 me 不见
,因此加一个 if(me) 的判断即可。
=============================================================================
执行时段错误: *Bad argument 2 to <=
Expected: string Got: 7.
程式: /adm/daemons/shut_d.c:81
物件: /adm/daemons/shut_d
/d/ppl/justinj/kemi/mob/clid#1066468 "heart_beat" /std/monster.c:103
/adm/daemons/mob_d "continue_attack" /adm/daemons/mob_d.c:392
/adm/daemons/mob_d "execute_attack" /adm/daemons/mob_d.c:430
/d/ppl/justinj/kemi/mob/clid#1066468 "special_fun"
/d/ppl/justinj/kemi/mob/clid.c:47
/d/ppl/justinj/kemi/mob/clid#1066468 "shut" /std/mob/living.c:145
/adm/daemons/mob_d "shut" /adm/daemons/mob_d.c:522
/adm/daemons/shut_d "shut_tar" /adm/daemons/shut_d.c:81
第 81 行的内容是
ss>2 ? c=(int)kinds[2] : c=1;
if(c>7) c=7;
通常这行会有问题代表 c 有问题,也就代表 kinds[2] 有问题。
case 1..5:
frog->shut(HIG"$N举起大刀劈向$O,让$O感到无处可逃\n"NOR,78788,7777,
({"dam","physics","4"}),ppl,7);
break;
我在 shut 有做了防错判断,但基本上 kinds[2] 还是要使用整数
,这个再请 justin 修正。
=============================================================================
/u/l/laechan/skycastle/room/street/alley_shop1.c
暂改为不生虫。我猜虫没问题,有问题的片段还要再找找。
=============================================================================
执行时段错误: *Bad argument 3 to message()
Expected: string or array or object Got: 0.
程式: /adm/simul_efun/tell_room.c(/adm/obj/simul_efun.c):4
物件: /adm/obj/simul_efun
/std/user#8555 "heart_beat" /std/user.c:617
/std/user#8555 "continue_attack" /std/user.c:253
/adm/daemons/user_d "continue_attack" /adm/daemons/user_d.c:886
/adm/daemons/user_d "execute_attack" /adm/daemons/user_d.c:1003
/adm/daemons/user_d "normal_attack" /adm/daemons/user_d.c:1186
/adm/obj/simul_efun "new_defance"
/adm/simul_efun/new_defance.c(/adm/obj/simul_efun.c):325
/u/l/laechan/special/mob/fingerwind1#1837939 "shield"
/u/l/laechan/special/mob/fingerwind1.c:27
/d/ppl/quest/evil/mob/ghost#1837768 "shield"
/d/ppl/quest/evil/mob/ghost.c:117
/adm/obj/simul_efun "tell_room"
/adm/simul_efun/tell_room.c(/adm/obj/simul_efun.c):4
fingerwind 的 shield 函数
mixed shield(object frog,object ppl,int dam,string type)
ghost 的 shield 函数
mixed shield(object me,object tar,int dam,int dam2,string type)
但是 ghost 的 dam2 并没有被使用,所以应该是函数宣告错误,
grep 的结果
[/d/ppl/quest/evil/mob/devil.c]
97:mixed shield(object me,object tar,int dam,int dam2,string type)
[/d/ppl/quest/evil/mob/ghost.c]
99:mixed shield(object me,object tar,int dam,int dam2,string type)
只有这两只这样写,均已更正。
=============================================================================
执行时段错误: *Bad argument 1 to call_other()
Expected: string or array or object Got: 0.
程式: /d/ppl/ina/dinah/blood/mob/king.c:202
物件: /d/ppl/ina/dinah/blood/mob/king#1737891
生物名: Master Of Hell
/d/ppl/ina/dinah/blood/mob/king#1737891 "heart_beat"
/std/bmonster.c:129
/adm/daemons/mob_d "continue_attack"
/adm/daemons/mob_d.c:375
/d/ppl/ina/dinah/blood/mob/king#1737891 "die"
/d/ppl/ina/dinah/blood/mob/king.c:202
八卦府君的 bug。
void die()
{
object frog=this_object(),ppl=this_player(),ob;
write_file("/open/blade/ina_king",
ppl->query("short")+"打死"+ob->query("chi_name")+time()+"。\n");
202 行就是 write_file 那行,如上所述,有宣告 object ob
但是没有指配内容,则后面的 ob->query("chi_name") 自然会
出错。
同目录下并没有 bak 档,查更早之前的 king 它是这样写的
void die()
{
object frog=this_object(),ppl=this_player(),ob;
write_file("/open/blade/ina_king",this_player()->query("name")+
"打死"+this_object()->query("chi_name")+time()+".\n");
所以才说备份档很重要。
按照上面的写法把 ob 改成 frog 即可。这 bug 应该已存在
很长的时间,至少之前换 mudos 时就已存在。
=============================================================================