Sir Juninho
New Member
- Joined
- May 4, 2009
- Messages
- 85
- Reaction score
- 1
Hello, I have a TFS 0.3.5 and this script, but have a problem witch it...
Look:
The Script on creaturescripts.xml
The Script
what's wrong in this script?
I'm sorry, I'm a little noob, ;s
Look:
Code:
[04/08/2009 15:19:43] Lua Script Error: [CreatureScript Interface]
[04/08/2009 15:19:43] data/creaturescripts/scripts/skullcheck.lua:onThink
[04/08/2009 15:19:43] luaGetCreatureSkullType(). Creature not found
[04/08/2009 15:19:43] Lua Script Error: [CreatureScript Interface]
[04/08/2009 15:19:43] data/creaturescripts/scripts/skullcheck.lua:onThink
[04/08/2009 15:19:43] internalGetPlayerInfo(). Player not found
[04/08/2009 15:19:43] Lua Script Error: [CreatureScript Interface]
[04/08/2009 15:19:43] data/creaturescripts/scripts/skullcheck.lua:onThink
[04/08/2009 15:19:43] data/creaturescripts/scripts/skullcheck.lua:3: attempt to compare number with boolean
[04/08/2009 15:19:43] stack traceback:
[04/08/2009 15:19:43] data/creaturescripts/scripts/skullcheck.lua:3: in function <data/creaturescripts/scripts/skullcheck.lua:1>
The Script on creaturescripts.xml
Code:
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
The Script
Code:
function onThink(cid, interval)
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
what's wrong in this script?
I'm sorry, I'm a little noob, ;s