• 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!

Teleport temple problem

Ramy Sedkey

New Member
Joined
Dec 7, 2013
Messages
78
Reaction score
2
[22:30:41.640] [Error - TalkAction Interface]
[22:30:41.640] data/talkactions/scripts/teleporttown.lua:eek:nSay
[22:30:41.640] Description:
[22:30:41.640] data/talkactions/scripts/teleporttown.lua:38: attempt to concaten
ate a nil value
[22:30:41.656] stack traceback:
[22:30:41.656] data/talkactions/scripts/teleporttown.lua:38: in function <data/
talkactions/scripts/teleporttown.lua:1>

that's happen when I try to go to temple by (/t)
 
I'm using (TFS 0.3.7-r5963-win32-1)
and this is the script

function onSay(cid, words, param, channel)
local master = false
if(words == '/t') then
master = true
elseif(param == '') then
local str = ""
for i, town in ipairs(getTownList()) do
str = str .. town.name .. "\n"
end

doShowTextDialog(cid, ITEM_ACTION_BOOK, str)
return true
end

local tid, t = cid, string.explode(param, ",")
if(t[(master and 1 or 2)]) then
tid = getPlayerByNameWildcard(t[(master and 1 or 2)])
if(not tid or (isPlayerGhost(tid) and getPlayerAccess(tid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[(master and 1 or 2)] .. " not found.")
return true
end
end

local tmp = getPlayerTown(tid)
if(not master) then
tmp = t[1]
if(not tonumber(tmp)) then
tmp = getTownId(tmp)
if(not tmp) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
return true
end
end
end

local pos = getTownTemplePosition(tmp)
if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
return true
end

pos = getClosestFreeTile(tid, pos)
if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return true
end

tmp = getCreaturePosition(tid)
if(doTeleportThing(tid, pos) and not isPlayerGhost(tid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end

return true
end
 
yes with the position for the temple
and this is the first time this happen I mean yesterday I didn't have this problem
i just wake up this morning adn I found it like that
 
yes with the position for the temple
and this is the first time this happen I mean yesterday I didn't have this problem
i just wake up this morning adn I found it like that
Then Search for what you edited and btw the server you are using is pretty good i have been using it for 1 year i didn't get an error so see what you did :) i hope i can get a copy of that server again
 
Back
Top