• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Script Problem (doTeleportThing)

Bill3000

New Member
Joined
Jul 26, 2010
Messages
106
Reaction score
1
Here is the script:

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.
 
Lua:
function onSay(cid, words, param, channel)
    local temple = getTownTemplePosition(getPlayerTown(cid))
    for _, pid in ipairs(getPlayersOnline()) do
        doTeleportThing(pid, 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
 
Back
Top