• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

SkullCheck Error

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:
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
 
maybe a solution!
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

no more errors now appear!
test it ;D
 
Back
Top