NoMethodError when enemy uses element 10, Emerald's Equipment Sets

● ARCHIVED · READ-ONLY
Started by Ras101 4 posts View original ↗
  1. Hi, I get error NoMethodError, undefined method for " /" for nil:NilClass when an enemy attacks me with an attack that has the 10th element listed in the database. The error occurs at line 1036 of Emerald's Equipment Sets. Specifically, the block of code that has the error is:



      alias eme_ebs_element_rate element_rate
      def element_rate(element_id)
        value = eme_ebs_element_rate(element_id) + sets_element_rate(element_id) / 100
        return value
      end

     

    The value = eme_ebs_element_rate ... line is where the error occurs. I am betting it has something to do with the numbering of the element in the database. Elements 11 and so on also cause the error. Any help?

    I have no scripting knowledge, so I have no idea what to do lol

    I should also add that the error also occurs when my characters are not even wearing any equipment, so I don't think it's a problem with the equipment, since this script deals with equipment sets.
  2. Dont know about that script, but you could try THIS. :)
  3. I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Please include a LINK to the script you are having troubles with. The little snippet you provided does not even indicate what class the method is in.


    Did you start a game, save it, add the script, then resume your saved game? That could be the trouble there. A lot of scripts assume you're playing a NEW game and don't cater for the possibility that you might already have a game saved at the point the script is added. Try starting a new game and see if the issue still happens.
  4. Hi! The error occurs even during battle tests and in new games too.

    The link to the script is here: http://www.rpgmakervxace.net/topic/1092-ees-emeralds-equipment-sets/ (the link to the script is in the post)

    EDIT: Someone found a fix for this error on other forums. He told me to put this below the script and it works!

    class Game_Actor < Game_Battler def sets_element_rate(element_id) @sets_element_rate[element_id - 1] end def sets_element_rate_change(element_id, value) @sets_element_rate[element_id - 1] += value endendI'm currently in touch with the creator of the script so that he can update this. :)