Yanfly Buff & State Manager Error [VX Ace]

Hello. I recently encountered a problem with Yanfly's B&S Manager. I tried to add a <reapply ignore> notetag to a state but when such state is applied to an enemy, the game returns an error:
Bez tytułu.png

I am 100% sure it's the notetag's fault, because after I remove it, the error no longer appears.

Does anyone know how to fix this?

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

Can you show a screenshot of how you've used the notetag?
Here it is:
Bez tytułu.png
Apparently this is an error that other people have had, according to the script page. This snippet should fix the issue:
Ruby:
class Game_Battler < Game_BattlerBase

  def add_state(state_id)
    return if $data_states[state_id].nil?
    state_rules = $data_states[state_id].state_reapply_rules
    return if state_rules == 0 && state?(state_id)
    if state_addable?(state_id)
      add_new_state(state_id) unless state?(state_id)
      reset_state_counts(state_id) if [0, 1].include?(state_rules)
      total_state_counts(state_id) if state_rules == 2
      @result.added_states.push(state_id).uniq!
    end
  end
 
end
Where to put this?
Sorry but I am completely green at ruby... 🙁
Just pop it in a new slot below Yanfly's Buff & State Manager script.
Thank you! ^^

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-buff-state-manager-error-vx-ace.121558/