I'm trying to set up a battle with a Darmanitan w/ zen mode but each time I turn on the switch to activate the modifier, I get this error:
It works fine without the modifier switch.
Code:
---------------------------
Pokémon
---------------------------
Exception: RuntimeError
Message: Script error within event 1, map 113 (Raiken Mountain):
Exception: NameError
Message: Section086:26undefined local variable or method `poke' for nil:NilClass
***Full script:
pbWildBattle(PBSpecies::DARMANITAN,25,18,true,false)
Interpreter:243:in `pbExecuteScript'
PokemonEncounterModifiers:23:in `call'
PBEvent:54:in `trigger'
PBEvent:49:in `each'
PBEvent:49:in `trigger'
PokemonField:928:in `pbGenerateWildPokemon'
PokemonField:952:in `pbWildBattle'
(eval):1:in `pbExecuteScript'
Interpreter:1599:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:276:in `pbExecuteScript'
Interpreter:1599:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
This exception was logged in
C:\Users\KwesiD\Saved Games/Pokémon/errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
It works fine without the modifier switch.