Relic Castle

Hello, I just changed the regional dex in Pokemon Essentials v.17.2 in Debug menu and when I play test my project, and when I open the Pokédex an error shows up, which I can't figure out where the error is, so I need your help: ( I also have alls Sprites and Icons)

---------------------------
Essence
---------------------------
[Pokémon Essentials version 17.2]

Exception: NoMethodError

Message: undefined method `[]' for nil:NilClass

PScreen_PokedexMain:328:in `pbGetDexList'

PScreen_PokedexMain:325:in `each'

PScreen_PokedexMain:325:in `pbGetDexList'

PScreen_PokedexMain:350:in `pbRefreshDexList'

PScreen_PokedexMain:260:in `pbStartScene'

PScreen_PokedexMain:1191:in `pbStartScreen'

ModularMenu:353

ModularMenu:350:in `pbFadeOutIn'

ModularMenu:350

ModularMenu:338:in `call'



This exception was logged in

C:\Users\Utilizador\Saved Games\Essence\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------

It says "
Message: undefined method `[]' for nil:NilClass
PScreen_PokedexMain:328:in `pbGetDexList'

form = ($Trainer.formlastseen[nationalSpecies][1] || 0)


PScreen_PokedexMain:325:in `each' :
for i in 1...regionalSpecies.length

PScreen_PokedexMain:326' :
nationalSpecies = regionalSpecies

PScreen_PokedexMain:325:in `pbGetDexList'
def pbGetDexList
dexlist = []
dexdata = pbOpenDexData
region = pbGetPokedexRegion
regionalSpecies = pbAllRegionalSpecies(region)
if regionalSpecies.length==1
# If no Regional Dex defined for the given region, use National Pokédex
for i in 1..PBSpecies.maxValue
regionalSpecies.push(i)
end
end


PScreen_PokedexMain:350:in `pbRefreshDexList'
def pbRefreshDexList(index=0)
dexlist = pbGetDexList



PScreen_PokedexMain:260:in `pbStartScene'
pbRefreshDexList($PokemonGlobal.pokedexIndex[pbGetSavePositionIndex])


PScreen_PokedexMain:1191:in `pbStartScreen'
@scene.pbStartScene


ModularMenu:353
screen.pbStartScreen

ModularMenu:350:in `pbFadeOutIn' ModularMenu:350
pbFadeOutIn(99999){


ModularMenu:338:in `call'
#Pokédex
MenuHandlers.addEntry(:POKEDEX,_INTL("Pokédex"),"menuPokedex",proc{|menu|



This is the errorlog and the correspondent errors (I could think of) But idk how to fix that, hope somebody can help me, I'm stuck on this and couldn't really make any progress
Top