• 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.

Problem creating new trainers

pokefan41

RMXP Game Developer
143
Posts
13
Years
    • Seen Oct 20, 2023
    I've been trying to create new trainers in my game, but every time I do, I get this error.


    Exception: NameError

    Message: uninitialized constant PokeBattle_Pokemon::PBStats

    PokeBattle_Pokemon:806:in `calcStats'

    PokeBattle_Pokemon:804:in `each'

    PokeBattle_Pokemon:804:in `calcStats'

    PokeBattle_Pokemon:884:in `initialize'

    PTrainer_NPCTrainers:128:in `new'

    PTrainer_NPCTrainers:128:in `pbNewTrainer'

    PTrainer_NPCTrainers:114:in `loop'

    PTrainer_NPCTrainers:137:in `pbNewTrainer'

    PTrainer_NPCTrainers:108:in `each'

    PTrainer_NPCTrainers:108:in `pbNewTrainer'

    What does this mean? How am I supposed to fix this?
     
    Last edited by a moderator:
    223
    Posts
    8
    Years
  • Did you copy one of the existing trainers in the trainers pbs to make sure the order is correct and just changed the name and type and the Pokemon with it's attacks(basically all of it)? Umm can you show the text of your newly created trainers? Maybe that will help or just the whole txt of trainers if you want.
     
    1,224
    Posts
    10
    Years
  • Sounds like an old version of Essentials, I think the editor was broken a couple times in the past. I believe the newest (16.2) works well. That being said, use the in game editor (via the debug menu) for most forms of editing to avoid these potential issues. I think battler heights and attack animations are the only editor functions that can't be done through the debug menu.
     
    Back
    Top