Here is the script:
here is the Console error:
How the script must work: when i type /totemple all players Online must be teleported to their home temple.
Lua:
function onSay(cid, words, param, channel)
local temple = getPlayerTown(cid)
for _, cid in ipairs(getPlayersOnline()) do
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "All players have been teleported to the Home Temple.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
end
return TRUE
end
here is the Console error:
Code:
attempt to index a global value:
stack traceback:
[C]: in function 'doTeleportThing'
How the script must work: when i type /totemple all players Online must be teleported to their home temple.