Game crashes when I put a state (RPG Maker VX Ace)

I am still new on this RPG maker stuff... But I am making some progress creating a rpg of my own... I used Yanfly's Buff & State Manager in RPG Maker VX Ace and whenever I put the <reapply ignore> tag in the state noteboxs and during the game test when I apply a state (stun and/or blind for example), the game crashes and a message appears:

" Script Game_Battler line 245: NoMethodError occurred.
undefined method '>' for nil:NilClass "


Please, I really need help... 🙁:blush:🙁

This is the part of that script where the error is blamed: (the one in red)

240 #--------------------------------------------------------------------------
241 # * Update State Turn Count
242 #--------------------------------------------------------------------------
243 def update_state_turns
244 states.each do |state|
245 @state_turns[state.id] -= 1 if @state_turns[state.id] > 0
246 end
247 end

I've moved this thread to Script Support. Thank you.

Edit: wrong RM....

In case of ace, please follow the link "how to use a script" and post a screenshot of the backtracer output of that error here.
I found the solution in other site I visited, but I thank you everyone who offered to help me with this problem anyways.

If someone else has this problem, do the following:

In Yanfly's Buff & State Manager Script, place in the line 709:
reset_state_counts(state_id) if state_rules == 0

This will allow the <reapply ignore> tag to work properly.
Yep, that is how you fix it. For some reason Yanfly left out the code for the ignore tag, so it doesn't work. I think there's one other that doesn't have a tag, so be careful with those tags. I had to totally rewrite that section so that I could get buff and states manager to work right on ACE.

Also, I got it to crash once by a strange remove by restriction state, but it requires you to accidentally use a remove by restriction state as a passive, which you should never be doing anyways.

Ok to close this one now?
Hmmm, I have what you said into account. 👍

And yes, go ahead. ☺️
Yep, that is how you fix it. For some reason Yanfly left out the code for the ignore tag, so it doesn't work. I think there's one other that doesn't have a tag, so be careful with those tags. I had to totally rewrite that section so that I could get buff and states manager to work right on ACE.

Also, I got it to crash once by a strange remove by restriction state, but it requires you to accidentally use a remove by restriction state as a passive, which you should never be doing anyways.

Ok to close this one now?

Yes. And thanks for the recommendation. I have it into account 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.



Also I think you might have posted it 2x by accident, next time we'd prefer you to just edit the first post.

Original thread: https://forums.rpgmakerweb.com/threads/game-crashes-when-i-put-a-state-rpg-maker-vx-ace.83924/