Hello, i have some problems with my script.
When my event has started, and a player is trying to enter the arena he should bounce back.
But he doesnt.
Script
Here's the error:
When my event has started, and a player is trying to enter the arena he should bounce back.
But he doesnt.
Script
Lua:
function onStepIn(cid, item, frompos, itemEx, topos)
if item.actionid == 7795 then
doTeleportThing(cid, {x=1122,y=923,z=7})
elseif item.actionid == 7796 then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
doPlayerSendCancel(cid, "You cannot enter.")
end
return true
end
Here's the error:
Code:
[14:54:36.452] [Error - MoveEvents Interface]
[14:54:36.454] data/movements/scripts/zombieevent/movezombieevent.lua:onStepIn
[14:54:36.458] Description:
[14:54:36.459] attempt to index a nil value
[14:54:36.460] stack traceback:
[14:54:36.461] [C]: in function 'doTeleportThing'
[14:54:36.463] ...ta/movements/scripts/zombieevent/movezombieevent.lua:5: in fu
nction <...ta/movements/scripts/zombieevent/movezombieevent.lua:1>