Relic Castle

In RMXP while using the debug mode when i try swapping a pokemon in a battle it gives an error.........Then resumes the battle but without the battler sprite and menu sprites instead
Screenshot
Top