• 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!

AddEvent - Error

mateuszal3

New Member
Joined
Mar 6, 2011
Messages
18
Reaction score
0
Welcome. I have problem... On load TFS 0.2 Tibia 8.1.

Code:
function travel(cid, steps)
	if steps > 7 then
		doTeleportThing(cid, GetCreatureDestinationPos(cid))
		doCreatureSay(cid, "HYPER SPACE !!", TALKTYPE_ORANGE_2)
	else
		doTeleportThing(cid, {x=getCreaturePosition(cid).x,y=getCreaturePosition(cid).y-1,z=getCreaturePosition(cid).z})
		steps = steps + 1
		addEvent(travel ,100 , cid , steps)
	end
end

function onStepIn(cid, item, pos)
	position = GetCreatureDestinationPos(cid)
	if (position.x == 0) then
		doTeleportThing(cid, {x=95, y=117, z=7}) 
	else 
		addEvent(travel, 1, cid, 0)
	end
end

In console i've get error:
[29/04/2012 16:28:57] Lua Script Error: [MoveEvents Interface]
[29/04/2012 16:28:57] data/movements/scripts/hyper.lua:onStepIn

[29/04/2012 16:28:57] luaAddEvent(). callback parameter should be a function.

Please help me.. and sorry for my English :/
 
Back
Top