Ir para conteúdo
  • 0

Ajuda Action Erro Pokedex


Pergunta

ERRO:

[20/06/2012 19:24:39] [Error - Action Interface]
[20/06/2012 19:24:39] data/actions/scripts/pokedex.lua:onUse
[20/06/2012 19:24:39] Description:
[20/06/2012 19:24:40] data/actions/scripts/pokedex.lua:44: attempt to index a boolean value
[20/06/2012 19:24:40] stack traceback:
[20/06/2012 19:24:40]  data/actions/scripts/pokedex.lua:44: in function <data/actions/scripts/pokedex.lua:3>

 

SCRIPT:

 

local rate = 20
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 leveltable = getPokemonExperienceTable(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, leveltable)
 end
return true
end
if not isPlayer(item2.uid) then return true end
local unlock = 0
for i = 1, #oldpokedex do
 if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then
 unlock = unlock + 1
 end
end
local str = ""
local lnl = 0
local poks = ""
local player = getRecorderPlayer(toPos, cid)

for x = 1001, 1251 do
 local y = tonumber(x - 1000)
 if getPlayerInfoAboutPokemon(player, oldpokedex[y][1]).dex then
  if isPokemonInOwnList(player, oldpokedex[y][1]) then
str = str.."\n["..threeNumbers(y).."] - "..oldpokedex[y][1].."   (•)"
lnl = lnl + 1
  else
str = str.."\n["..threeNumbers(y).."] - "..oldpokedex[y][1]..""
  end
 else
  str = str.."\n["..threeNumbers(y).."] -  ?"
 end
end
if cid == player then
 doPlayerSendTextMessage(cid, 27, "You can open a pokedex entry by typing \"/dex <name>\". Example: \"/dex Pikachu\".")
 str = "Pokédex Information:\n\n- Unlocked pokémon species: "..unlock.."\n- Pokémon species that you own: "..lnl.."\n\n(•) means that you have already used that pokémon species.\n\nPokémon Database:\n"..str..""
  if string.len(str) <= 8192 then
doShowTextDialog(cid, 2382, str)
  end
else
 doPlayerSendTextMessage(cid, 27, getPlayerName(player).." has unlocked "..unlock.."/251 pokémons already, and has captured "..lnl.." pokemons until now.")
end
return true
end

Link para o comentário
https://xtibia.com/forum/topic/188398-ajuda-action-erro-pokedex/
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

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