Postado Setembro 1, 2016 8 anos Eai TibiaKing, estou enfrentando um grande problema no meu Duel System, sendo eles: Citar [01/09/2016 19:32:34] [Error - Action Interface] [01/09/2016 19:32:34] data/actions/scripts/goback.lua:onUse [01/09/2016 19:32:34] Description: [01/09/2016 19:32:34] data/lib/011-string.lua:29: attempt to index local 'str' (a number value) [01/09/2016 19:32:34] stack traceback: [01/09/2016 19:32:34] data/lib/011-string.lua:29: in function 'explode' [01/09/2016 19:32:34] data/lib/Duel System.lua:59: in function 'removeFromTableDuel' [01/09/2016 19:32:34] data/lib/Duel System.lua:141: in function 'doEndDuel' [01/09/2016 19:32:34] data/lib/Duel System.lua:188: in function 'checkDuel' [01/09/2016 19:32:34] data/lib/some functions.lua:840: in function 'doReturnPokemon' [01/09/2016 19:32:34] data/actions/scripts/goback.lua:85: in function <data/actions/scripts/goback.lua:13> e também tem um outro que é quando verifica a quantidade de pokemons valida para chamar Duelo. Vamos supor que eu tenha 1 pokemon na bag, mesmo assim da pra mim chamar Duelo com 6 Pokemons.. alguem teria uma solução para isso? Ps: Eu já tenho a proteção para contar pokemons dos invitados do Duelo, segue abaixo: data\creaturescripts\scripts\tvsys.lua: Citar local sid = getPlayerByName(getPlayerStorageValue(cid, 52483):match("(.*),")) ---------------- Proteçao para ter um oponente valido! if not isCreature(sid) then doPlayerSendTextMessage(cid, 20, "The other player isn't online! Duel is canceled!") doPlayerSetVocation(cid, 1) for i = 1, #storagesDuel do setPlayerStorageValue(cid, storagesDuel, -1) end doCreatureSetSkullType(cid, 0) return false end ---------------- Proteçao para os 2 players terem a qntdade de pokes pro duel local pokes1 = getLivePokeballs(cid, getPlayerSlotItem(cid, 3).uid, true) local pokes2 = getLivePokeballs(sid, getPlayerSlotItem(sid, 3).uid, true) if #pokes1 < (channelId-12) or #pokes2 < (channelId-12) then local tpw = getPlayerStorageValue(cid, 52480) > 1 and "ally" or "opponent" doPlayerSendTextMessage(cid, 20, "You or your "..tpw.." doesn't have that amount of pokemons in their bags! Duel are canceled!") doPlayerSetVocation(cid, 1) for i = 1, #storagesDuel do setPlayerStorageValue(cid, storagesDuel, -1) end doCreatureSetSkullType(cid, 0) return false end ---------------- if getPlayerStorageValue(cid, 52480) > 1 then setPlayerStorageValue(cid, 52482, getPlayerStorageValue(cid, 52482).. getCreatureName(sid)..",") setPlayerStorageValue(cid, 52483, "") end ---------------- data\actions\scripts\order.lua: Citar local pokes = getLivePokeballs(cid, getPlayerSlotItem(cid, 3).uid, true) if #pokes < getPlayerStorageValue(player, 52481) then return doPlayerSendTextMessage(cid, 20, "You need atleast ".. getPlayerStorageValue(player, 52481).." pokemons to duel with this person!") end OBS: Não é o arquivo inteiro, são apeans partes da proteção incluidas nos arquivos citados nos diretorios acima. INFOS DO SERVIDOR: Base: PDA (Pokemon Dash Advanced) Versão 8.54 TFS: 0.3.6
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.