Estou com um BUG no comando /up ele funciona normal porem gera esse BUG no exe queria ajuda pra arrumar ^^
BUG
Spoiler
[29/01/2020 00:38:19] [Error - TalkAction Interface]
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:onSay
[29/01/2020 00:38:19] Description:
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:30: attempt to call global 'gerarEmVolta' (a nil value)
[29/01/2020 00:38:19] stack traceback:
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:30: in function <data/talkactions/scripts/teleportfloor.lua:1>
SCRIPT
function onSay(cid, words, param, channel)
local n = 1
if(param ~= '' and tonumber(param)) then
n = math.max(0, tonumber(param))
end
local tmp, pos = getCreaturePosition(cid), getCreaturePosition(cid)
if(words:sub(2, 2) == "u") then
pos.z = pos.z - n
else
pos.z = pos.z + n
end
if pos.z == 7 then
elseif pos.z <= 6 then
doAreaCombatHealth(0,0,pos,0,0,0,255)
doCreateItem(460,1,pos)
end
pos = getClosestFreeTile(cid, pos, false, false)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return true
end
if(doTeleportThing(cid, pos, true) and not isPlayerGhost(cid)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
end
gerarEmVolta(getThingPos(cid))
return true
end
Pergunta
BrunoMaciel 3
Estou com um BUG no comando /up ele funciona normal porem gera esse BUG no exe queria ajuda pra arrumar ^^
BUG
[29/01/2020 00:38:19] [Error - TalkAction Interface]
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:onSay
[29/01/2020 00:38:19] Description:
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:30: attempt to call global 'gerarEmVolta' (a nil value)
[29/01/2020 00:38:19] stack traceback:
[29/01/2020 00:38:19] data/talkactions/scripts/teleportfloor.lua:30: in function <data/talkactions/scripts/teleportfloor.lua:1>
SCRIPT
function onSay(cid, words, param, channel) local n = 1 if(param ~= '' and tonumber(param)) then n = math.max(0, tonumber(param)) end local tmp, pos = getCreaturePosition(cid), getCreaturePosition(cid) if(words:sub(2, 2) == "u") then pos.z = pos.z - n else pos.z = pos.z + n end if pos.z == 7 then elseif pos.z <= 6 then doAreaCombatHealth(0,0,pos,0,0,0,255) doCreateItem(460,1,pos) end pos = getClosestFreeTile(cid, pos, false, false) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end if(doTeleportThing(cid, pos, true) and not isPlayerGhost(cid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end gerarEmVolta(getThingPos(cid)) return true end
Link para o comentário
Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados