Hey ppls from OTLand please help me whit that zombievent Error
Data/Globalevents/Scripts/Zombie/onthink
Thx Otland
PHP:
[29/07/2012 17:11:44] [Error - GlobalEvent Interface]
[29/07/2012 17:11:44] data/globalevents/scripts/zombie/onthink.lua:onThink
[29/07/2012 17:11:44] Description:
[29/07/2012 17:11:44] data/lib/zombie_event.lua:105: bad argument #2 to 'random' (interval is empty)
[29/07/2012 17:11:44] stack traceback:
[29/07/2012 17:11:44] [C]: in function 'random'
[29/07/2012 17:11:44] data/lib/zombie_event.lua:105: in function 'spawnNewZombie'
[29/07/2012 17:11:44] data/globalevents/scripts/zombie/onthink.lua:6: in function <data/globalevents/scripts/zombie/onthink.lua:1>
[29/07/2012 17:11:44] [Error - GlobalEvents::think] Couldn't execute event: ZombieGlobalThink
Data/Globalevents/Scripts/Zombie/onthink
PHP:
function onThink(interval, lastExecution, thinkInterval)
if(getStorage(ZE_STATUS) == 2) then
setZombiesToSpawnCount(getZombiesToSpawnCount()+1)
local players = getZombiesEventPlayers()
for i=1, getZombiesToSpawnCount() * 2 do
if(getZombiesToSpawnCount() > 1 and spawnNewZombie()) then
setZombiesToSpawnCount(getZombiesToSpawnCount()-1)
end
end
end
return true
end
Thx Otland