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

Discussion in 'RGSSx Script Support' started by QuietGuy, Sep 12, 2017.

Thread Status:
Not open for further replies.
  1. QuietGuy

    QuietGuy Warper

    Messages:
    4
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    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::frown:

    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
     
    #1
  2. mlogan

    mlogan I am not sir, mr., dude or bro

    Messages:
    11,176
    Likes Received:
    5,960
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. Andar

    Andar Global Moderators

    Messages:
    23,797
    Likes Received:
    4,910
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    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.
     
    #3
  4. QuietGuy

    QuietGuy Warper

    Messages:
    4
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    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.
     
    #4
  5. bgillisp

    bgillisp Global Moderators

    Messages:
    8,312
    Likes Received:
    6,234
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    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?
     
    #5
  6. QuietGuy

    QuietGuy Warper

    Messages:
    4
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Hmmm, I have what you said into account. :thumbsup-left:

    And yes, go ahead. :cutesmile:
     
    #6
  7. QuietGuy

    QuietGuy Warper

    Messages:
    4
    Likes Received:
    0
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Yes. And thanks for the recommendation. I have it into account :)
     
    #7
  8. bgillisp

    bgillisp Global Moderators

    Messages:
    8,312
    Likes Received:
    6,234
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    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.
     
    #8
Thread Status:
Not open for further replies.

Share This Page