Custom animation crashing [SOLVED]

This custom animation crashes when played in certain scenarios. For example, it works fine when being attacked at 1 range, but when being attacked at 2 range it crashes. I tested the animation by importing it into a vanilla Fe8 rom and it works fine there meaning the animation itself is good. Thanks in advance.

Report file: https://drive.google.com/file/d/1DRly-Y-Tdhn9k_lT-10OG1qywHGfrlXc/view?usp=sharing

Fire Emblem - The Sacred Stones-0
The issue is with that class’s unarmed animation, not the staff animation that you put in the report. You can see if you set that class’s unarmed state to use the staff anim instead of the unarmed anim; it won’t crash


The unarmed animation’s script is completely missing code for the “equipped with ranged weapon” mode which causes this crash.


If you go to Battle Animations → SectionData editor for this animation, and copy the frame and the 01 code from mode 9 or 10 to mode 11 (making sure these things are in the correct order), the issue will be fixed.

Fire Emblem - The Sacred Stones-1

Or I could just drop the fixed animation here

Thank you so much! It really surprises me how fast the community helps out newer hackers such as myself.