• 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?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Pokemon Essentials V18 Trainer error

ChaosandCalamity

The Harbinger
29
Posts
3
Years
  • Age 18
  • USA
  • Seen Nov 5, 2021
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.
 
143
Posts
3
Years
  • Age 22
  • Seen Oct 3, 2021
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.
 

ChaosandCalamity

The Harbinger
29
Posts
3
Years
  • Age 18
  • USA
  • Seen Nov 5, 2021
#-------------------------------
[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:

ChaosandCalamity

The Harbinger
29
Posts
3
Years
  • Age 18
  • USA
  • Seen Nov 5, 2021
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