Error in movements script...
zombie.lua
tag
I get this error:
Someone's can fix this?
Very thanks..!
zombie.lua
LUA:
local config = {
playerCount = 1560, -- Global storage for counting the players in the event
maxPlayers = 100, -- Max players who can participate
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if not isPlayer(cid) then
return doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid))
end
if getPlayerStorageValue(cid, 17001) == 1 then
doPlayerSendTextMessage(cid, 27, "You can't enter when you are riding.")
return addEvent(tpBack, 100, cid, fromPosition)
end
if getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendTextMessage(cid, 27, "You can't enter when you are flying.")
return addEvent(tpBack, 100, cid, fromPosition)
end
if #getCreatureSummons(cid) >= 1 then
doPlayerSendTextMessage(cid, 27, "You can't play the event with pokemons.")
return addEvent(tpBack, 100, cid, fromPosition) and doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid))
end
if getPlayerStorageValue(cid, 5700) == 1 then
doPlayerSendTextMessage(cid, 27, "You can't enter when you are mounted in a bike.")
return addEvent(tpBack, 100, cid, fromPosition)
end
if getPlayerGroupId(cid) == 4 then
doPlayerSendTextMessage(cid, 27, "The Gamemasters CANNOT enter to the events.")
return addEvent(tpBack, 100, cid, fromPosition)
end
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,"You have entered the event! Wait begins the event.")
if getGlobalStorageValue(config.playerCount) < config.maxPlayers then
setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1)
if getGlobalStorageValue(config.playerCount) == config.maxPlayers then
doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.")
else
doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
end
else
addEvent(tpBack, 1000, cid, fromPosition)
doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.")
return false
end
print(getStorage(config.playerCount) .. " Players in the zombie event.")
return true
end
function tpBack(cid, fromPosition)
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
tag
Code:
<movevent type="StepIn" actionid="1863" event="script" value="zombie.lua"/>
I get this error:
Code:
[02/08/2012 18:44:59] [Error - MoveEvents Interface]
[02/08/2012 18:44:59] data/movements/scripts/zombie.lua:onStepIn
[02/08/2012 18:44:59] Description:
[02/08/2012 18:44:59] (luaDoTeleportThing) Thing not found
Someone's can fix this?
Very thanks..!
Last edited: