搜索
查看: 1954|回复: 4

关于"index out of bounds"的问题

[复制链接]
发表于 2008-4-5 14:35:33 | 显示全部楼层 |阅读模式 来自 中国–甘肃–兰州
今天测试bazooka_slot3.amxx时发现了个问题,控制台会出现大量的debug信息:
L 04/05/2008 - 14:26:09: [AMXX] Displaying debug trace (plugin "bazooka_slot3.amxx")
L 04/05/2008 - 14:26:09: [AMXX] Run time error 4: index out of bounds
L 04/05/2008 - 14:26:09: [AMXX] [0] bazooka_slot3.sma:: pfn_touch (line 945)
我尝试了在第945句代码后再增加下面的这句代码:
if(equal(ClassName1, "rpglancher")&&equal(ClassName2, "rpglancher"))
return PLUGIN_CONTINUE
不过发现问题还是没有解决,这个"index out of bounds"到底是怎么回事呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2008-4-5 14:57:36 | 显示全部楼层 来自 中国–北京–北京–海淀区

回复: 关于"index out of bounds"的问题

945应该是这句吧
if(Has_Bazooka[touched])

touched应该改成toucher

把你加的那行去掉,classname1应该是"player"
回复

使用道具 举报

 楼主| 发表于 2008-4-5 16:32:15 | 显示全部楼层 来自 中国–甘肃–兰州

回复: 关于"index out of bounds"的问题

把touched改成toucher后还是不行啊,依然会出现上面的debug信息。
回复

使用道具 举报

发表于 2008-4-5 17:40:26 | 显示全部楼层 来自 中国–北京–北京–海淀区

回复: 关于"index out of bounds"的问题

那就改成 if(toucher < sizeof Has_Bazooka && Has_Bazooka[toucher])
回复

使用道具 举报

 楼主| 发表于 2008-4-5 20:43:09 | 显示全部楼层 来自 中国–甘肃–兰州

回复: 关于&quot;index out of bounds&quot;的问题

经过初步的测试,没发现debug信息了,再次感谢jim_yang楼主!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表