Quando eu do um DEX no pokemon ele funciona normal porem ele gera um ERRO no EXE do server.
OBS: Esse erro da em todos os pokemons seja normal ou shiny.
BUG
Spoiler
[11/02/2020 00:27:24] Error while executing function "getPlayerInfoAboutPokemon("Maciel, Alolan Golem)", Alolan Golem doesn't exist.
[11/02/2020 00:27:24] [Error - Action Interface]
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:onUse
[11/02/2020 00:27:24] Description:
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:4: attempt to index a boolean value
[11/02/2020 00:27:24] stack traceback:
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:4: in function 'checkDex'
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:40: in function <data/actions/scripts/pokedex.lua:17>
[11/02/2020 00:29:08] Gengar ball has been created by Maciel.
[11/02/2020 00:29:14] Error while executing function "getPlayerInfoAboutPokemon("Maciel, Alolan Golem)", Alolan Golem doesn't exist.
Sempre que dou dex no pokemon em TODOS normal ou shiny da esse ERRO no EXE do server.
SCRIPT(Pokedex)
local function checkDex(cid)
local unlock = 0
for i = 1, #oldpokedex do
if getPlayerInfoAboutPokemon(cid, oldpokedex[i][1]).dex then
unlock = unlock + 1
end
end
return unlock
end
local rate = 50
local rewards = {
[10] = {{2160, 1}, {11638, 1}, {12344, 5}},
}
local sto = 63999
function onUse(cid, item, fromPos, item2, toPos)
if not isCreature(item2.uid) then
return true
end
local poke = getCreatureName(item2.uid)
if isMonster(item2.uid) then
local this = newpokedex[getCreatureName(item2.uid)]
local myball = 0
if isSummon(item2.uid) then
myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
end
if not getPlayerInfoAboutPokemon(cid, poke).dex then
local exp = this.level * rate
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked ".. getCreatureName(item2.uid).." in your pokedex!")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.")
doSendMagicEffect(getThingPos(cid), 210)
doPlayerAddExperience(cid, exp)
doAddPokemonInDexList(cid, poke)
else
doShowPokedexRegistration(cid, item2, myball)
end
local list = checkDex(cid)
local r = rewards[list]
-- print("List: "..list)
--sendMsgToPlayer(cid, 27, "Parabéns, você tem "..list.." pokeDex!")
if r and getPlayerStorageValue(cid, sto) < list then
for _, TABLE in ipairs(r) do
doPlayerAddItem(cid, TABLE[1], TABLE[2])
sendMsgToPlayer(cid, 27, "Voce ganhou "..TABLE[2].." ".. getItemNameById(TABLE[1]).."!")
end
setPlayerStorageValue(cid, sto, list)
end
return true
end
if not isPlayer(item2.uid) then return true end
local kanto = 0
local johto = 0
--alterado v1.7 \/\/
for i = 1, #oldpokedex do
if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then
if i <= 151 then
kanto = kanto+1
elseif i >= 209 then
johto = johto+1
end
end
end --alterado v1.6
return true
end
Pergunta
BrunoMaciel 3
Estou tendo um problema na PokeDex (BUG)
Quando eu do um DEX no pokemon ele funciona normal porem ele gera um ERRO no EXE do server.
OBS: Esse erro da em todos os pokemons seja normal ou shiny.
BUG
[11/02/2020 00:27:24] Error while executing function "getPlayerInfoAboutPokemon("Maciel, Alolan Golem)", Alolan Golem doesn't exist.
[11/02/2020 00:27:24] [Error - Action Interface]
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:onUse
[11/02/2020 00:27:24] Description:
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:4: attempt to index a boolean value
[11/02/2020 00:27:24] stack traceback:
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:4: in function 'checkDex'
[11/02/2020 00:27:24] data/actions/scripts/pokedex.lua:40: in function <data/actions/scripts/pokedex.lua:17>
[11/02/2020 00:29:08] Gengar ball has been created by Maciel.
[11/02/2020 00:29:14] Error while executing function "getPlayerInfoAboutPokemon("Maciel, Alolan Golem)", Alolan Golem doesn't exist.
Sempre que dou dex no pokemon em TODOS normal ou shiny da esse ERRO no EXE do server.
SCRIPT(Pokedex)
local function checkDex(cid) local unlock = 0 for i = 1, #oldpokedex do if getPlayerInfoAboutPokemon(cid, oldpokedex[i][1]).dex then unlock = unlock + 1 end end return unlock end local rate = 50 local rewards = { [10] = {{2160, 1}, {11638, 1}, {12344, 5}}, } local sto = 63999 function onUse(cid, item, fromPos, item2, toPos) if not isCreature(item2.uid) then return true end local poke = getCreatureName(item2.uid) if isMonster(item2.uid) then local this = newpokedex[getCreatureName(item2.uid)] local myball = 0 if isSummon(item2.uid) then myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8) end if not getPlayerInfoAboutPokemon(cid, poke).dex then local exp = this.level * rate doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked ".. getCreatureName(item2.uid).." in your pokedex!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained "..exp.." experience points.") doSendMagicEffect(getThingPos(cid), 210) doPlayerAddExperience(cid, exp) doAddPokemonInDexList(cid, poke) else doShowPokedexRegistration(cid, item2, myball) end local list = checkDex(cid) local r = rewards[list] -- print("List: "..list) --sendMsgToPlayer(cid, 27, "Parabéns, você tem "..list.." pokeDex!") if r and getPlayerStorageValue(cid, sto) < list then for _, TABLE in ipairs(r) do doPlayerAddItem(cid, TABLE[1], TABLE[2]) sendMsgToPlayer(cid, 27, "Voce ganhou "..TABLE[2].." ".. getItemNameById(TABLE[1]).."!") end setPlayerStorageValue(cid, sto, list) end return true end if not isPlayer(item2.uid) then return true end local kanto = 0 local johto = 0 --alterado v1.7 \/\/ for i = 1, #oldpokedex do if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then if i <= 151 then kanto = kanto+1 elseif i >= 209 then johto = johto+1 end end end --alterado v1.6 return true end
Quem puder ajudar ^^
Link para o comentário
Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados