therrax
Member
- Joined
- Jul 12, 2012
- Messages
- 262
- Solutions
- 1
- Reaction score
- 11
Hi.
TFS 1.0
I have small problem with lastman event:
script:
console error:
TFS 1.0
I have small problem with lastman event:
script:
Code:
local createpos = {x=778,y=996,z=7} -- Every 2h where will the Teleport Appear
local topos = {x=775,y=1006,z=8} -- Where will the Teleport take you
local msg = "Last man standing event TP has now been closed! It will open again in 2 hours! All participants get Ready for a Fight!"
local timetoclose = 60 -- in second
local function remove()
local tp = getTileItemById(createpos,1387).uid
if tp ~= 0 then
doRemoveItem(tp)
broadcastMessage("Teleport zamkniety!", MESSAGE_STATUS_WARNING)
end
end
function onTime(time)
doCreateTeleport(1387, topos, createpos)
broadcastMessage("Last man standing event TP is now open!\nCatch the teleport within "..timetoclose.." seconds! Teleport is Located in Boss area!", MESSAGE_STATUS_WARNING)
addEvent(remove,timetoclose*1000)
return true
end
Code:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/LMS/lastman.lua:onTime
data/globalevents/scripts/LMS/lastman.lua:15: attempt to call global 'doCreateTe
leport' (a nil value)
stack traceback:
[C]: in function 'doCreateTeleport'
data/globalevents/scripts/LMS/lastman.lua:15: in function <data/globalev
ents/scripts/LMS/lastman.lua:14>