Hi guys.
I Have a problem with the Skullcheck!
When i kill one monster or player, appears this message on the console:
[Error - Creaturescript Interface]
data/creaturescripts/skullcheck.lua
nThink
Description:
Attempt to call a number value
stack traceback.
^ IT SPAM ALOT on the console!
And i got debug.
Someone help me please!.
Script:
function onThink(cid, interval)
if(not isCreature(cid)) then
return
end
local skull, skullEnd = getCreatureSkull(cid), getPlayerSkullEnd(cid)
if(skullEnd > 0 and skull > SKULL_WHITE and os.time() > skullEnd and not getCreatureCondition(cid, CONDITION_INFIGHT)) then
doPlayerSetSkullEnd(cid, 0, skull)
end
end
I Have a problem with the Skullcheck!
When i kill one monster or player, appears this message on the console:
[Error - Creaturescript Interface]
data/creaturescripts/skullcheck.lua
Description:
Attempt to call a number value
stack traceback.
^ IT SPAM ALOT on the console!
And i got debug.
Someone help me please!.
Script:
function onThink(cid, interval)
if(not isCreature(cid)) then
return
end
local skull, skullEnd = getCreatureSkull(cid), getPlayerSkullEnd(cid)
if(skullEnd > 0 and skull > SKULL_WHITE and os.time() > skullEnd and not getCreatureCondition(cid, CONDITION_INFIGHT)) then
doPlayerSetSkullEnd(cid, 0, skull)
end
end