Ir para conteúdo

Posts Recomendados

Bom, como o titulo ja diz... ta ocorrendo erro na talkaction !pokeballs que conta as brokes.

Em alguns pokes funciona, em outros da esse erro.

Ex.: sandshrew, charizard, e os shiny

 

[19/10/2012 23:33:54] [Error - TalkAction Interface]
[19/10/2012 23:33:54] data/talkactions/scripts/pokeballs.lua:onSay
[19/10/2012 23:33:54] Description:
[19/10/2012 23:33:54] data/talkactions/scripts/pokeballs.lua:19: attempt to index field '?' (a nil value)
[19/10/2012 23:33:54] stack traceback:
[19/10/2012 23:33:54]  data/talkactions/scripts/pokeballs.lua:19: in function 'sendBrokesCountMsg'
[19/10/2012 23:33:54]  data/talkactions/scripts/pokeballs.lua:51: in function <data/talkactions/scripts/pokeballs.lua:41>

Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/
Compartilhar em outros sites

aki tb esta tudo certo... va no seu lib/configuration.lua e veja se esta assim essa tabela..

newpokedex = {
["Bulbasaur"] = {gender = 875, level = 18, storage = 1001, stoCatch = 666001},
["Ivysaur"] = {gender = 875, level = 38, storage = 1002, stoCatch = 666002},
["Venusaur"] = {gender = 875, level = 75, storage = 1003, stoCatch = 666003},
["Charmander"] = {gender = 875, level = 18, storage = 1004, stoCatch = 666004},
["Charmeleon"] = {gender = 875, level = 38, storage = 1005, stoCatch = 666005},
["Charizard"] = {gender = 875, level = 75, storage = 100, stoCatch = 666006},

 

se alguma dessas linhas n tiver o 'stoCatch = xxxxx' eh esse o problema.. se n for isso.. n sei oq dizer, vc deve ter esquecido alguma coisa ;/

Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/#findComment-1367362
Compartilhar em outros sites

@Cleberadm minha versão é a 1.7 , se existe alguma mais atual me passe por favor.

 

@SkyLigh

 

Segue o script:

 

 

  Mostrar conteúdo oculto

 

 

 

@Slicer

ta tudo com stoCatch

 

 

 

obs.: se meu sistema estiver desatualizado postem o atual aqui por favor...

Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/#findComment-1367552
Compartilhar em outros sites

Veja assim.

 

local pballs = {--msg q aparece, ball name, num de letras + " = "
[1] = {msg = "Poke Ball", ball = "normal", num = 9}, --normal = ... 9 letras
[2] = {msg = "Great Ball", ball = "great", num = 8}, --great = ... 8 letras
[3] = {msg = "Super Ball", ball = "super", num = 8},
[4] = {msg = "Ultra Ball", ball = "ultra", num = 8},
[5] = {msg = "Saffari Ball", ball = "saffari", num = 10},
}
local function sendBrokesCountMsg(cid, name, str)
if getPlayerStorageValue(cid, str) == -1 then
doPlayerSendTextMessage(cid, 27, "You haven't wasted any pokeball to try catch a "..name)
return true
end
local t = string.explode(getPlayerStorageValue(cid, str), ",")
local msg = "You have wasted: "
local n = 0
for a = 1, #t do
local st2 = string.sub(t[a], d + pballs[a].num, e +5)
if tonumber(st2) ~= 0 then
if n ~= 0 then
msg = msg..", "
end
if tonumber(st2) ~= 1 then
msg = msg..st2.." "..pballs[a].msg.."s"
n = n +1
else
msg = msg..st2.." "..pballs[a].msg
n = n +1
end
end
end
msg = msg.." to try catch a "..name..", ultil now."
if n == 0 then
msg = "You haven't wasted any pokeball to try catch a "..name
end
doPlayerSendTextMessage(cid, 27, msg)
end
function onSay(cid, words, param)
if(param == '') then
doPlayerSendTextMessage(cid, 27, "Enter with a pokemon name...")
return true
elseif newpokedex[doCorrectPokemonName(param)] then
local storage = newpokedex[doCorrectPokemonName(param)].stoCatch
local name = doCorrectPokemonName(param)
sendBrokesCountMsg(cid, name, storage)
else
doPlayerSendTextMessage(cid, 27, "This isn't a pokemon...")
return true
end

return true
end

Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/#findComment-1367555
Compartilhar em outros sites

  Em 20/10/2012 em 14:33, SkyLigh disse:

Veja assim.

 

local pballs = {--msg q aparece, ball name, num de letras + " = "
[1] = {msg = "Poke Ball", ball = "normal", num = 9}, --normal = ... 9 letras
[2] = {msg = "Great Ball", ball = "great", num = 8}, --great = ... 8 letras
[3] = {msg = "Super Ball", ball = "super", num = 8},
[4] = {msg = "Ultra Ball", ball = "ultra", num = 8},
[5] = {msg = "Saffari Ball", ball = "saffari", num = 10},
}
local function sendBrokesCountMsg(cid, name, str)
if getPlayerStorageValue(cid, str) == -1 then
doPlayerSendTextMessage(cid, 27, "You haven't wasted any pokeball to try catch a "..name)
return true
end
local t = string.explode(getPlayerStorageValue(cid, str), ",")
local msg = "You have wasted: "
local n = 0
for a = 1, #t do
local st2 = string.sub(t[a], d + pballs[a].num, e +5)
if tonumber(st2) ~= 0 then
if n ~= 0 then
msg = msg..", "
end
if tonumber(st2) ~= 1 then
msg = msg..st2.." "..pballs[a].msg.."s"
n = n +1
else
msg = msg..st2.." "..pballs[a].msg
n = n +1
end
end
end
msg = msg.." to try catch a "..name..", ultil now."
if n == 0 then
msg = "You haven't wasted any pokeball to try catch a "..name
end
doPlayerSendTextMessage(cid, 27, msg)
end
function onSay(cid, words, param)
if(param == '') then
doPlayerSendTextMessage(cid, 27, "Enter with a pokemon name...")
return true
elseif newpokedex[doCorrectPokemonName(param)] then
local storage = newpokedex[doCorrectPokemonName(param)].stoCatch
local name = doCorrectPokemonName(param)
sendBrokesCountMsg(cid, name, storage)
else
doPlayerSendTextMessage(cid, 27, "This isn't a pokemon...")
return true
end

return true
end

 

 

 

mesma coisa... mas acho q encontrei o erro...

Quando peguei a lib configuration do slicer 1.7 alguns storages estao errados...

Ex.: Charizard o storage dele na newpokedex era p tar 1006, ta 100...

Vou testar e falo aki

 

 

 

-----Edit-----

 

Não mudou... continua o erro

 

 

-----Edit2------

 

Pode mover, ja arrumei!

Editado por BobStriker
Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/#findComment-1367562
Compartilhar em outros sites

  • 5 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
https://xtibia.com/forum/topic/196932-encerrado-talk-pokeballs/#findComment-1732279
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...