Hi guys, i need help, i have created this function:
actually it has a bug, when i use this function in a summon, the server get crash, can someone help me to solve this?
Thanks in advance
LUA:
function setCreatureHealth(cid, health)
a = getCreatureMaxHealth(cid)
b = a - health
if a - b > 0 then
return doCreatureAddHealth(cid, -b)
else
return 0
end
return 1
end
actually it has a bug, when i use this function in a summon, the server get crash, can someone help me to solve this?
Thanks in advance