• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

undefined method `pbLoadTrainer' error

  • 4
    Posts
    9
    Years
    • Seen Aug 31, 2015
    I don't think I should've posted in the previous topic for this particular error, so I'll ask here instead, apologies:

    For some reason, trainers don't seem to work. Pokemon will battle fine, but when you try to battle trainers this occurs
    (In my game, when talking to the trainer)
    Exception: RuntimeError
    Message: Script error within event 48, map 97 (Redcliff Town):
    Exception: NoMethodError
    Message: Section111:355:in `pbTrainerBattle'undefined method `pbLoadTrainer' for #<Interpreter:0xa89f1e0>
    ***Full script:
    pbTrainerBattle(PBTrainers:POKEMONRANGER_F,"Amelia",_I("Good battle!"),false,0,false)
    Interpreter:243:in `pbExecuteScript'
    (eval):1:in `pbExecuteScript'
    Interpreter:794:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:794:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'

    In Debug mode, using test trainer battle

    Exception: NoMethodError
    Message: undefined method `pbLoadTrainer' for #<PokemonMenu:0xaddc8a0>
    PokemonTrainers:355:in `pbTrainerBattle'
    PokemonDebug:786:in `pbDebugMenu'
    PokemonDebug:297:in `loop'
    PokemonDebug:824:in `pbDebugMenu'
    PokemonPauseMenu:242:in `pbStartPokemonMenu'
    PokemonPauseMenu:241:in `pbFadeOutIn'
    PokemonPauseMenu:241:in `pbStartPokemonMenu'
    PokemonPauseMenu:142:in `loop'
    PokemonPauseMenu:256:in `pbStartPokemonMenu'
    Scene_Map:202:in `call_menu'

    This occurs with every trainer, and didn't occur previously. Any ideas?
     
    Last edited:
    I don't think I should've posted in the previous topic for this particular error, so I'll ask here instead, apologies:

    For some reason, trainers don't seem to work. Pokemon will battle fine, but when you try to battle trainers this occurs
    (In my game, when talking to the trainer)
    Exception: RuntimeError
    Message: Script error within event 48, map 97 (Redcliff Town):
    Exception: NoMethodError
    Message: Section111:355:in `pbTrainerBattle'undefined method `pbLoadTrainer' for #<Interpreter:0xa89f1e0>
    ***Full script:
    pbTrainerBattle(PBTrainers:POKEMONRANGER_F,"Amelia",_I("Good battle!"),false,0,false)
    Interpreter:243:in `pbExecuteScript'
    (eval):1:in `pbExecuteScript'
    Interpreter:794:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:794:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'

    In Debug mode, using test trainer battle

    Exception: NoMethodError
    Message: undefined method `pbLoadTrainer' for #<PokemonMenu:0xaddc8a0>
    PokemonTrainers:355:in `pbTrainerBattle'
    PokemonDebug:786:in `pbDebugMenu'
    PokemonDebug:297:in `loop'
    PokemonDebug:824:in `pbDebugMenu'
    PokemonPauseMenu:242:in `pbStartPokemonMenu'
    PokemonPauseMenu:241:in `pbFadeOutIn'
    PokemonPauseMenu:241:in `pbStartPokemonMenu'
    PokemonPauseMenu:142:in `loop'
    PokemonPauseMenu:256:in `pbStartPokemonMenu'
    Scene_Map:202:in `call_menu'

    This occurs with every trainer, and didn't occur previously. Any ideas?

    i had this error before what i did to fix it is this first i use this format in the actually event(Trainer)

    in a comment event you will have 5 rows
    1: Comment:Battle: (intro text)
    2: Comment:Type: (Type of trainer ex. BUGCATCHER must be caped)
    3: Comment:Name: (obviously the name of npc)
    4: Comment:EndSpeech: (what trainer will say after in battle after you win)
    5: Comment:EndBattle: (what npc will say when you click on him again after battle)

    after that is done, you will have to manully input the trainers info in trainer.txt in this format,

    #-------------------
    BUGCATCHER
    Cale
    4
    CATERPIE,10
    WEEDLE,10
    METAPOD,10
    KAKUNA,10
    #-------------------

    game should load up fine and you should be able to make trainers.
     
    I tried this, but it didn't work. This problem occurs now with every trainer, even ones who were previously working. It occurs in the debug mode test trainer interface as well.
     
    I'm running Essentials v15 (2014-12-31).
    Since trainers actually working I've made the title screen animated (don't know how that could have an effect) and added a mega evolution into multiple forms. Since I've been mostly mapping it's actually been a while since I tested trainer battles, although wild pokemon battles still work fine.
    Asides from above, I've edited the items PBS a little, although again, that couldn't have an effect.
    Really need help on this, backtracking would lose months of work.
    EDIT: Resolved.
     
    Last edited:
    Okay, but resolved how? This thread is of no use if it presents a problem and states that someone has a solution but they won't share it. Don't you think others could benefit from that knowledge?
     
    Back
    Top