Ok, looks like a MissingNo has been found in your game. You caught it and now your game has crashed. The MissingNo has invaded your phone. My only explanation
As a nooby coder i have 1 explanation.
Most variables arent loaded
As Pokémon player i have another explanation: ITS MISSINGNO