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

[PBS Question] registering pokemon as trainers?

  • 56
    Posts
    5
    Years
    So I'm putting in the teams for the Leaders and Elite Four, but when the game starts up i get this message.

    [Pokémon Essentials version 17]

    Exception: RuntimeError

    Message: Undefined Trainer constant name: ELECTRODE,55,,EXPLOSION,THUNDER,SONICBOOM,ROLLOUT,0,M,,,,20

    Name must consist only of letters, numbers, and

    underscores and can't begin with a number.

    In addition, the name must be defined

    in trainertypes.txt.

    File PBS/trainers.txt, line 174

    ELECTRODE,55,,EXPLOSION,THUNDER,SONICBOOM,ROLLOUT,0,M,,,,20



    Compiler:668:in `pbGetConst'

    Compiler:732:in `parseTrainer'

    Compiler:2532:in `pbCompileTrainers'

    Compiler:2530:in `loop'

    Compiler:2667:in `pbCompileTrainers'

    Compiler:4401:in `pbCompileAllData'

    Compiler:4515

    It seems to be detecting the Pokemon's name as the trainers name? I dont understand. The error is occuring on the first elite four member, named Nikola. In trainers.txt and trainertypes.txt i have her put down over lorelei as
    #-------------------------------
    ELITEFOUR_Nikola
    Nikola
    2,FULLRESTORE,FULLRESTORE

    and

    67,ELITEFOUR_Nikola,Elite Four,100,Battle Elite,,,Female,,

    respectively. What's going on?
     
  • 87
    Posts
    7
    Years
    • Seen Nov 22, 2023
    It's possible that you messed up somewhere else in the file, causing it to think that Electrode is supposed to be a trainer.
    Double-check all the other lines to make sure they're okay. You should also try removing that trainer to see if the error persists.


    Do you have it set up exactly like this?
    ELITEFOUR_Nikola
    Nikola
    2,FULLRESTORE,FULLRESTORE
    ELECTRODE,55,,EXPLOSION,THUNDER,SONICBOOM,ROLLOUT,0,M,,,,20
    If so, you're missing 1 Pokemon in her entry. Please include all of the relevant lines.
     
    Last edited:
  • 56
    Posts
    5
    Years
    I removed the trainer and it did the same thing to the next E4's (doug) Breloom. It's not the first Pokemon, Electrode is Nikola's third pokemon and breloom is doug's second, if that means anything.
     
  • 87
    Posts
    7
    Years
    • Seen Nov 22, 2023
    If she has 3 Pokemon, change it to:

    ELITEFOUR_Nikola
    Nikola
    3,FULLRESTORE,FULLRESTORE

    The number in red defines how many Pokemon that trainer has.
     
    Last edited:
  • 56
    Posts
    5
    Years
    THAT was the problem! I thought that the 2 meant how many items they were meant to have! I fixed that, but now a new problem has come up and this is the crash report.

    [Pokémon Essentials version 17]

    Exception: RuntimeError

    Message: Expected a species name:

    File PBS/trainers.txt, line





    Compiler:2560:in `pbCompileTrainers'

    Compiler:2553:in `each'

    Compiler:2553:in `pbCompileTrainers'

    Compiler:2530:in `loop'

    Compiler:2667:in `pbCompileTrainers'

    Compiler:4401:in `pbCompileAllData'

    Compiler:4515

    I really cant tell what this one means, it almost looks bugged
     
    Last edited:
  • 87
    Posts
    7
    Years
    • Seen Nov 22, 2023
    Perhaps your other trainers also need to have their numbers updated.
    If you set it so a trainer has 3 Pokemon but only list 2, it'll crash; that number needs to be exact.
     
    Last edited:
    Back
    Top