So I've been working on this project in VX Ace for a while now, and despite having a lot of scripts (relative to what I usually do) it generally runs okay... except that sometimes it randomly crashes during or at the end of battle. The only trend I've seen is that it tends to happen when enemies or actors enter new states, including the death state, but it doesn't happen every single time, just seemingly random. I've attached the error it gives me, the line it points me to, and the scripts I have running in the game. I'm not much of a programmer, I've experimented with Python and Java, so any help would be appreciated.