• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Error] Random irrelevant error

6
Posts
5
Years
    • Seen Jul 29, 2019
    I am creating a game in PK. Essentials. I was testing the game when, out of nowhere, this error occurred.
    -----------------------------------------------------------------------------------
    Script 'PokeBattle_Trainer' line 197: NameError occurred.

    uninitialized constant PokeBattle_Trainer::PBSpecies
    -----------------------------------------------------------------------------------
    This is a script error, of course. I had not been doing anything at all relevant to that script and in fact I hardly ever modify the scripts at all. The most recent things I had been doing were:
    - Removing a Trainer I had created by accident from the trainers.pbs file
    - Adding a line in an event that enabled Mystery Gifts
    I really don't know what the problem is. If anyone needs more info, I can provide. Thanks for any help!
     

    Attachments

    • Screenshot_17.png
      Screenshot_17.png
      4.3 KB · Views: 16
    Last edited:

    mybusiness

    Guest
    0
    Posts
    From line 194 to 207 in PokeBattle_Trainer is this your code?
    Code:
    def pokedexSeen(region=-1)   # Number of Pokémon seen
        ret=0
        if region==-1
          for i in 0..PBSpecies.maxValue
            ret+=1 if @seen[i]
          end
        else
          regionlist=pbAllRegionalSpecies(region)
          for i in regionlist
            ret+=1 if @seen[i]
          end
        end
        return ret
      end
     
    Last edited:
    6
    Posts
    5
    Years
    • Seen Jul 29, 2019
    Good news! I tried starting the game from RPG maker and then starting it again from the .exe file and now it is working fine! Not sure if that was actually what fixed it, but if you are having this error, maybe that will work.
     
    36
    Posts
    4
    Years
    • Seen May 2, 2024
    So I know there's a rule about not reviving dead posts, but I'm having the exact same problem, I've been searching for an eternity and I can't seem to fix the problem no matter what I do (yes, I tried to start the game from RPG Maker (playtest), and then again from the .exe file, but nothing seems to be working). I tried to cancel out that specific line in the script editor, but that just started a whole chain reaction of problems that wasn't there before, so I un-canceled it again, but it's still the only problem preventing my game from starting...
     
    Back
    Top