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

Lua AddEvent Error [Help]

DanneZ

Web-Scripting-Design-Host
Joined
Jan 16, 2010
Messages
84
Reaction score
2
Location
Sweden
Hello dear Otland people.

help me with this string?
Code:
addEvent(teleportBack, cfg.timer * 60 * 5, cid, item.uid)

Config:
Code:
 local cfg = {
           timer =     5 
	   }

Error:
Code:
[06/05/2011 14:15:56] Lua Script Error: [MoveEvents Interface] 
[06/05/2011 14:15:56] data/movements/scripts/Walkintoroom.lua:onStepIn

[06/05/2011 14:15:56] luaAddEvent(). callback parameter should be a function.

Thanks for ur time =)
Yours DanneZ.
 
edit:
function
Lua:
function teleportBack(position)
	if getPlayerStorageValue(cid, 5040) == -1 then
		setPlayerStorageValue(cid, 5210, -1)
		doTeleportThing(cid, position)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end
end
and
Lua:
addEvent(teleportBack, cfg.timer*60*5, cfg.backPosition)
 
edit:
function
Lua:
function teleportBack(position)
	if getPlayerStorageValue(cid, 5040) == -1 then
		setPlayerStorageValue(cid, 5210, -1)
		doTeleportThing(cid, position)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end
end
and
Lua:
addEvent(teleportBack, cfg.timer*60*5, cfg.backPosition)

Thanks mate, thats really works =)
Rep++ you ofc <3
 
Last edited:
Back
Top