• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

talkactions erorr

a7aa7a

Member
Joined
Jul 5, 2011
Messages
316
Reaction score
13
Code:
[20:51:18.578] [Error - TalkAction Interface]
[20:51:18.578] data/talkactions/scripts/teleporttown.lua:eek:nSay
[20:51:18.578] Description:
[20:51:18.578] data/talkactions/scripts/teleporttown.lua:33: attempt to concaten
ate field '?' (a nil value)
[20:51:18.578] stack traceback:
[20:51:18.578]  data/talkactions/scripts/teleporttown.lua:33: in function <data/
talkactions/scripts/teleporttown.lua:1>
[20:51:19.640] [Error - TalkAction Interface]
[20:51:19.640] data/talkactions/scripts/teleporttown.lua:eek:nSay
[20:51:19.640] Description:
[20:51:19.640] data/talkactions/scripts/teleporttown.lua:33: attempt to concaten
ate field '?' (a nil value)
[20:51:19.640] stack traceback:
[20:51:19.640]  data/talkactions/scripts/teleporttown.lua:33: in function <data/
talkactions/scripts/teleporttown.lua:1>
[20:51:30.062] [Error - TalkAction Interface]
[20:51:30.062] data/talkactions/scripts/creature.lua:eek:nSay
[20:51:30.078] Description:
[20:51:30.078] (luaDoCreateMonster) Monster with name '' not found
[20:51:32.218] [Error - TalkAction Interface]
[20:51:32.218] data/talkactions/scripts/creature.lua:eek:nSay
[20:51:32.218] Description:
[20:51:32.218] (luaDoCreateMonster) Cannot create monster: demon
[20:53:17.421] [Error - TalkAction Interface]
[20:53:17.421] data/talkactions/scripts/teleporttown.lua:eek:nSay
[20:53:17.421] Description:
[20:53:17.421] data/talkactions/scripts/teleporttown.lua:33: attempt to concaten
ate field '?' (a nil value)
[20:53:17.421] stack traceback:
[20:53:17.421]  data/talkactions/scripts/teleporttown.lua:33: in function <data/
talkactions/scripts/teleporttown.lua:1>
 
Last edited by a moderator:
tfs. 0.4
Code:
function onSay(cid, words, param, channel)
   local master = false
   if(words == '/t') then
     master = true
   elseif(param == '') then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
     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(cid)
   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, false)
   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
 
Back
Top