No method error in Battle

● ARCHIVED · READ-ONLY
Started by Xiao_XiaoX 8 posts View original ↗
  1. I've been working on my project and i have used a couple of scripts for it but now when i enter battle an error appears and it said:

    Script 'Window_Base' line 373: NoMethodError occurred

    undefined method `%' for nil:NilClass

    I don't know what happened im tried to replace all my scripts with the original ones but to my tries i have failed i really need help... Screenshot (19).pngScreenshot (18).png
  2. Did you start a new game everytime you changed your scripts?


    This error is most often caused by trying to load an old savegame, but 80% of the scripts NEED "new game" to initialize themselves, and if that initialization is missing the result is often "undefined XYZ for nil-class".


    Second possible cause is a wrong script configuration (missing notetags, wrong variables or switches, and so on.


    If that does not help you, we need links to all scripts to check them.
  3. What is ON line 373 of Window_Base?


    When you ask for help with scripts, ALWAYS include a link to those scripts.
  4. @Andar: I ALWAYS start a new game every time. So I really don't understand why it happened

    @Shaz: Sorry about that i forgot.    Line 373: rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  5. It looks like one of your scripts changed how icons are processed, or you changed the icon sheet to a different picture - or you placed an icon with an index outside the current iconsheets size.


    If you haven't worked with different iconsheets and this info doesn't help you find the script that changed the icon processing, use this to get the script causing the problem:


    http://www.himeworks.com/2013/06/09/custom-main-full-error-backtrace/
  6. i did change the iconset to a biggerset but what should i do to fix the issue? go back to the old one?
  7. check if the iconset works in a new project. If yes, you have to search for the error somewhere else. If not, then something on the new iconsheet is wrong and you need to fix that problem.
  8. Nah, I have seen this problem so many times. There is one particular script that a lot of people seem to like using, and it OFTEN causes this error. I wonder if it's Yanfly's core script, as that's the only one in the list that seems remotely familiar.


    You could use the backtracer script (I don't know the name OR the author - mental blank - but I'm sure someone will fill in the details) to find out what script is calling that method.