function on_StruckDamage(actor, nPoint)
local actorHeartAc = actor:getHeartAc()
local actorname = actor:getCharName()
local RaceId = actor:getRace()--种族ID
if RaceId == 0 then
local ndata = actor:getVal_U(10)
if ndata > 0 then--(人物)
actor:setVal_U(10,ndata-1)
print("U10:["..ndata.."]")
elseif ndata == 0 then
actor:runScript("@beigji")
end
end
return nPoint--返回指定伤害数值
end
2020/3/28 16:46:00 {0327} TPlayMonster.DoSpellMagic 11 Access violation at address 000000000085B827 in module 'M2Server.exe'. Read of address 0000000000000008
2020/3/28 16:46:00 U10:[6]
2020/3/28 16:46:00 U10:[5]
2020/3/28 16:46:01 U10:[4]
2020/3/28 16:46:01 U10:[3]
2020/3/28 16:46:01 U10:[2]
2020/3/28 16:46:02 U10:[1]
2020/3/28 16:46:03 {0327} TPlayMonster.DoSpellMagic 11 Access violation at address 000000000085B827 in module 'M2Server.exe'. Read of address 0000000000000008
毛病出在哪?