Wezza
lua nOOb
- Joined
- May 31, 2008
- Messages
- 2,278
- Reaction score
- 31
The error;
The lua;
Code:
[18/07/2014 10:00:00] Lua Script Error: [GlobalEvent Interface]
[18/07/2014 10:00:00] data/globalevents/scripts/castle.lua:onTimer
[18/07/2014 10:00:00] data/globalevents/scripts/castle.lua:43: attempt to concatenate a nil value
[18/07/2014 10:00:00] stack traceback:
[18/07/2014 10:00:00] data/globalevents/scripts/castle.lua:43: in function <data/globalevents/scripts/castle.lua:42>
[18/07/2014 10:00:00] [Error - GlobalEvents::timer] Couldn't execute event: castle
The lua;
Code:
local kingPos = {x=797,y=619,z=4}
function onTimer()
doBroadcastMessage("The Castle-gate is now open! " .. getCastleOwners() .. " will have to defend the castle in order to keep it! The conquerors have 30 minutes to enter the castle and kill the castle-king!", 22)
doCleanTile(kingPos) -- if tile is blocked king dont spawn, remove all items including mwalls...
local monster = doSummonCreature("The Castle-King", kingPos)
setGlobalStorageValue(_STORAGES.GLOBAL.king, monster)
openGate()
return TRUE
end