• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

Pokemon Essentials V18 Trainer error

ChaosandCalamity

The Harbinger
  • 29
    Posts
    4
    Years
    All trainers in pokemon essentials v18 has this error

    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18]

    Exception: RuntimeError

    Message: Script error within event 10 (coords 34,98), map 82 (North Jinyu Village):

    Exception: NameError

    Message: PTrainer_NPCTrainers:140:in `pbLoadTrainer'undefined local variable or method `level' for #<Interpreter:0xe2c90e8>



    ***Full script:

    pbTrainerBattle(:PATROLLER,"Tommy")



    Backtrace:

    Interpreter:201:in `pbExecuteScript'

    PTrainer_NPCTrainers:47:in `each'

    PTrainer_NPCTrainers:47:in `pbLoadTrainer'

    PTrainer_NPCTrainers:30:in `each'

    PTrainer_NPCTrainers:30:in `pbLoadTrainer'

    PField_Battles:463:in `pbTrainerBattle'

    (eval):1:in `pbExecuteScript'

    Interpreter:665:in `eval'

    Interpreter:201:in `pbExecuteScript'

    Interpreter:665:in `command_111'





    Backtrace:

    Interpreter:237:in `pbExecuteScript'

    Interpreter:665:in `command_111'

    Interpreter:279:in `execute_command'

    Interpreter:155:in `update'

    Interpreter:102:in `loop'

    Interpreter:158:in `update'

    Scene_Map:162:in `update'

    Scene_Map:160:in `loop'

    Scene_Map:169:in `update'

    Scene_Map:229:in `main'



    This exception was logged in

    C:\Users\latiu\Saved Games\Pokemon Essentials\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------

    Im not that good at coding nor reading it.
    I need help.
    Also I did download Pkm Essentials v18 the day it drop and Im unaware of any updates to it.
     
    Hey, don't worry I'll try to help you. Could you look if this line exists inside "def pbLoadTrainer(trainerid,trainername,partyid=0)".
    Code:
    level = poke[TPLEVEL]
    If it does, could you copy paste every instance of "level" in this script section into this thread? Or instead the entire function should also work.
     
    Does Patroller Tommy have any Pokemon in his party?
     
    #-------------------------------
    [PATROLLER,Tommy]
    LoseText = "I LOST TO AN INTRUDER!"
    Pokemon = CROAGUNK,11
    Pokemon = GROWLITHE,11
    #-------------------------------
    This is the trainer by itself in the trainer pbs
    #-----------------------------------
    74,PATROLLER,PATROLLER,30,,,,Mixed,,
    #------------------------------------
    This is the trainer type in the trainer type pbs
    Only thing is all trainers including pre-made trainers have that error
     
    Last edited:
    def pbLoadTrainerTypesData
    $PokemonTemp = PokemonTemp.new if !$PokemonTemp
    if !$PokemonTemp.trainerTypesData
    $PokemonTemp.trainerTypesData = load_data("Data/trainer_types.dat") || []
    end
    return $PokemonTemp.trainerTypesData
    end

    Heres what that script line looks like but it doesnt have
    level = poke[TPLEVEL]
     
    Back
    Top