Poste o código da função getNewMoveTable, localizada em data/lib/cooldown bar.lua.
LE
action
attempt to index local 'moveTable' (a boolean value)
Por leofox97, 28 de dez. de 2015 em Scripts
8
2.5k
29 de dezembro de 2015 às 01:13
info
Grupo: Campones
Registrado: 08/07/09
Posts: 67
Reputação: +1
Char no Tibia: Lord Kikiki

29 de dezembro de 2015 às 09:20
function getNewMoveTable(table, n)
if table == nil then
return false
end
local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12}
local returnValue = moves
if n then
returnValue = moves[n]
end
return returnValue
end
function doUpdateMoves(cid)
if not isCreature(cid) then return true end
local summon = getCreatureSummons(cid)[1]
local ret = {}
table.insert(ret, "12&,")
if not summon then
for a = 1, 12 do
table.insert(ret, "n/n,")
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
return true
end
if isTransformed(summon) then --alterado v1.9
moves = movestable[getPlayerStorageValue(summon, 1010)]
else
moves = movestable[getCreatureName(summon)]
end
for a = 1, 12 do
local b = getNewMoveTable(moves, a)
if b then
table.insert(ret, b.name..",")
else
local mEvolve
if not getCreatureName(summon):find("Mega") and getItemAttribute(getPlayerSlotItem(cid, 8).uid, "megaStone") then
if not isInArray(ret, "Mega Evolution,") then
table.insert(ret, "Mega Evolution,")
mEvolve = true
end
end
if not mEvolve then
table.insert(ret, "n/n,")
end
end
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
end
29 de dezembro de 2015 às 15:34
Em move1.lua, abaixo de:
if not move then
coloque:
print(movestable[name] and "true" or "false")
Informe o que for imprimido no console (true ou false).
info
Grupo: Campones
Registrado: 08/07/09
Posts: 67
Reputação: +1
Char no Tibia: Lord Kikiki

29 de dezembro de 2015 às 18:09
[29/12/2015 18:00:47] true
[29/12/2015 18:00:47] [Error - TalkAction Interface]
[29/12/2015 18:00:47] data/talkactions/scripts/move1.lua:onSay
[29/12/2015 18:00:47] Description:
[29/12/2015 18:00:47] data/talkactions/scripts/move1.lua:88: attempt to index local 'moveTable' (a boolean value)
[29/12/2015 18:00:47] stack traceback:
[29/12/2015 18:00:47] data/talkactions/scripts/move1.lua:88: in function <data/talkactions/scripts/move1.lua:21>
29 de dezembro de 2015 às 21:47
Hm, abaixo de:
local moveTable, index = getNewMoveTable(movestable[name]), 0
coloque:
print(type(moveTable))
Informe o que for imprimido no console.
info
Grupo: Campones
Registrado: 08/07/09
Posts: 67
Reputação: +1
Char no Tibia: Lord Kikiki

29 de dezembro de 2015 às 21:52
[29/12/2015 21:43:12] true
[29/12/2015 21:43:12] boolean
[29/12/2015 21:43:12] [Error - TalkAction Interface]
[29/12/2015 21:43:12] data/talkactions/scripts/move1.lua:onSay
[29/12/2015 21:43:12] Description:
[29/12/2015 21:43:12] data/talkactions/scripts/move1.lua:89: attempt to index local 'moveTable' (a boolean value)
[29/12/2015 21:43:12] stack traceback:
[29/12/2015 21:43:12] data/talkactions/scripts/move1.lua:89: in function <data/talkactions/scripts/move1.lua:21>
30 de dezembro de 2015 às 16:36
OK, últimas confirmações, suponho.
Abaixo do último print que postei, coloque:
print(moveTable and "moveTable true" or "moveTable false/nil")
Remova:
print(movestable[name] and "true" or "false")
Troque o código da função:
function getNewMoveTable(table, n)
Pelo seguinte:
function getNewMoveTable(table, n)
if table == nil then
print(0)
return false
end
print(1)
local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12}
print(2)
print("moves type: "..type(moves))
local returnValue = moves
if n then
print(3)
returnValue = moves[n]
end
print(4)
print("returnValue type: "..type(returnValue))
return returnValue
end
Novamente, informe o que for imprimido no console.
PS: Esse erro acontece com todos os pokémons que você tenta mega-evoluir, ou só com algum específico?



info
Grupo: Campones
Registrado: 08/07/09
Posts: 67
Reputação: +1
Char no Tibia: Lord Kikiki
galera tem como da uma ajuda?
Editado Dezembro 28 por leozinho16565