• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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
  • 142
    Posts
    14
    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:
    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.
     
    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