Looks like it works correctly now - I got through several battles without it crashing on line 708.
Thanks for the fix (And for the great script~), and sorry for any hassle I caused by bringing it up
*edit* One other thing, is there anything extra I need to do to get the Battlebacks to work?
I entered <battleback1: "RockCave1"> and upon opening the Bestiary entry the game crashes stating it was unable to find the file. I copied the filename directly from the image, and even tried importing it via the resource manager (Which was a longshot since it's from the standard RTP) but it gives me the same message each time.
As far as I know I've followed the instructions properly, but it's quite possible I'm missing something or entered something wrong.
Any thoughts?