Postado Novembro 3, 2018 6 anos Pessoal estou com um erro no meu servidor, os moves dos pokemon buga ao usar algum pokemon Segue abaixo o erro [03/11/2018 04:06:03] [Error - Action Interface] [03/11/2018 04:06:03] In a timer event called from: [03/11/2018 04:06:03] datapack/actions/scripts/goback.lua:onUse [03/11/2018 04:06:03] Description: [03/11/2018 04:06:03] datapack/lib/some functions.lua:1406: attempt to index a number value [03/11/2018 04:06:03] stack traceback: [03/11/2018 04:06:03] datapack/lib/some functions.lua:1406: in function 'getCD' [03/11/2018 04:06:03] datapack/lib/cooldown bar.lua:148: in function <datapack/lib/cooldown bar.lua:112> A função da some functions que ta dando erro é essa: Citar function getCD(item, tipo, limite) if not getItemAttribute(item, tipo) then return 0 end local string = getItemAttribute(item, tipo):gsub("cd:", "") local number = tonumber(string) - os.time() if number <= 0 then return 0 end if limite and limite < number then return 0 end return number end Função do cooldown que ta dando erro Citar function doUpdateCooldowns(cid) sendAllPokemonsBarPoke(cid) if not isCreature(cid) then return true end local a = getPlayerSlotItem(cid, ? local ret = {} table.insert(ret, "12|,") if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end end doPlayerSendCancel(cid, table.concat(ret)) return true end for cds = 1, 12 do ---- local summon = getCreatureSummons(cid)[1] if summon and getPlayerStorageValue(summon, 212123) >= 1 then cdzin = "cm_move"..cds else cdzin = "move"..cds end ---- if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = movestable[getCreatureName(summon)] end local b = getNewMoveTable(moves, cds) if not b then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end --alterado v1.9 end doPlayerSendCancel(cid, table.concat(ret)) return true end ---- if getCD(a.uid, cdzin) > 0 then if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..b.level..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end else if (useOTClient and b) then table.insert(ret, "0|"..b.level..",") else table.insert(ret, "0,") end end end doPlayerSendCancel(cid, table.concat(ret)) end
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.