Project1
标题:
Sideview脚本的CP条更新出错
[打印本页]
作者:
love4567536
时间:
2012-4-29 22:36
标题:
Sideview脚本的CP条更新出错
本帖最后由 love4567536 于 2012-5-12 22:02 编辑
#--------------------------------------------------------------------------
# ● CP条更新
#--------------------------------------------------------------------------
def refresh_cp
@blank_window.x = 128 - @info_viewport.ox
@basepic.x = 144 - @info_viewport.ox
for iii in $game_party.members + $game_troop.members
if iii.is_a?(Game_Actor)
icon_index = $data_weapons[iii.weapon_id].icon_index
@cppic[iii].src_rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
else
@cppic[iii].src_rect.set(312, 216, 24, 24)
end
if iii.hp > 0
@cppic[iii].visible = $CP可见
else
@cppic[iii].visible = false
end
@cppic[iii].x = 132 + (iii.cp * 384 / 5000).to_i - @info_viewport.ox
end
end
#--------------------------------------------------------------------------
复制代码
开始战斗后就会弹出:脚本 'Siddeview 3' 的第81行发生了NoMethodError . undefined method 'icon_index'for nil:NilClass
是因为什么原因啊?麻烦大家帮我看看,谢谢啦!
dsu_plus_rewardpost_czw
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1