Why does this return with: Argument #3 is unsafe? Can someone explain these effin' basics to me? Tfs 1.3
Do i need to declare what monster is inside each addevent or can i just use the declaration I have used in my action script? And how if so?
Do i need to declare what monster is inside each addevent or can i just use the declaration I have used in my action script? And how if so?
Lua:
addEvent(function(id)
local monster = Monster(id)
if not monster then
return
end
monster:setLevel(player:getStorageValue(storePetLevel) + 1)
doCreatureAddHealth(monster, getCreatureMaxHealth(monster) - getCreatureHealth(monster))
end, 1400, monster)