Postado Junho 25, 2020 5 anos Olá. Eu baixei um OT de PVP-E e comecei a personalizar. O OT inicial estava com todos os comandos funcionando. Porém, depois que eu fiz as personalizações, o comando /t parou de funcionar e não sei o motivo. Aparece o seguinte erro na distro: [Error - TalkAction Interface] data/talkactions/scripts/teleporttown.lua:onSay Description: data/talkactions/scripts/teleporttown.lua:33: attempt to concatenate field '?' (a nil value) stack traceback: data/talkactions/scripts/teleporttown.lua:33: in function <data/talkactions/scripts/teleporttown.lua:1> Este é meu teleporttown.lua: Citar 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 Agradeço desde já! Quem me ajudar ganha REP Editado Junho 25, 2020 5 anos por Mecianosz (veja o histórico de edições)
Postado Junho 27, 2020 5 anos Autor Em 25/06/2020 em 04:22, Mecianosz disse: Olá. Eu baixei um OT de PVP-E e comecei a personalizar. O OT inicial estava com todos os comandos funcionando. Porém, depois que eu fiz as personalizações, o comando /t parou de funcionar e não sei o motivo. Aparece o seguinte erro na distro: [Error - TalkAction Interface] data/talkactions/scripts/teleporttown.lua:onSay Description: data/talkactions/scripts/teleporttown.lua:33: attempt to concatenate field '?' (a nil value) stack traceback: data/talkactions/scripts/teleporttown.lua:33: in function <data/talkactions/scripts/teleporttown.lua:1> Este é meu teleporttown.lua: Agradeço desde já! Quem me ajudar ganha REP Resolvi o problema. Como eu troquei a distro, foi alterada a temple position. Tópico fechado.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.