Help SetTempSwitch("A")-Error + Random Wild Pokemon Battle?


Elite Trainer
Hello, I'm using Essentials V.17.2 and RPGMXP and made 2 Time-sensitive Events:

1. time sensitive event is about a rock, which gives you everyday a rockgem (as I made it alone w/o the 2nd; it worked)
2. time-sensitive event is about a Wild Pokémon Battle-event with an Overworld graphic from pidgey (level 2) (the battle works but an error occurs after battle)

This error occurs 10 seconds after the wild battle with pidgey

My Events:
Event page 1

Event page 2

Event page 3

Following Pokémon v.1.4 by mej71
Marin's Script Utilities by Marin
DP Menu by Marin
GenderSelection by shiney570 (I tweaked the positions)
Grass Animation (shows the NPC'S/PC's and OW-sprites walking inside the grass) by KleinStudio
PokeBattle_Pokemon (Heart Symbol additional script) by Mr. Gela
Heart Symbol Script (shows heart symbol on party menu) by Mr. Gela

I just want to add Wild random Battles like in Let's Go, Pikachu! and Eevee! where you can battle Pokémon and see their overworld sprite, it's what I'm trying to add to my game. For now it isn't random, but I wish I could do the event be with random Pokémon.

Thanks in advance!