Unexplained error - URGENT

● ARCHIVED · READ-ONLY
Started by nevfx 18 posts View original ↗
  1. Ok, strange error. For some reason, the game says there is some error with this piece of script in the Gamer_BattlerBase.

    Its line 268, this



    Code:
      value = param_base(param_id) + param_plus(param_id)
    I have not edited it in the slightest. The error is:

    undefined method '+' for nil:NilClass.

    What has happened? Recent changes made to scripts, for example adding new ones, didnt affect it before, it just happened right now.

    Help?
  2. What scripts did you add before this occurred? Does this occur in a blank project for you?
  3. I have added the difficult setting scrip, enemy hp bar and the YanPac battle hud scripts, which had no negative effect on my game, last night when i saved and turned off, everything was fine, even my game, which i was playing before i went to sleep!

    On a blank project, in battle test, nothing bad happens either.
  4. You're going to need to provide more information than that. When does this error occur? What scripts are you using?
  5. This error occurs whenever i enter battle. ONLY then as well. The only scripts i am using are the ones i listed and last night eveyrthign was working fine! This makes no sense to me.

    I have changed no other scripts, although I think i did take out the save line in one of them, to try to take the save option off the menu, but it didnt work and nothing bad happened at the time.
  6. Here are screen caps of the error message:

    Spoiler
    and the area in the script:

    Spoiler
    Does anyone have any suggestions? I was PLAYING the game right up uintil i went to bed last night nor problems, and today i opened the game without even opening the project to find this!
  7. The enemy HP bar and Battle HUD scripts are probably interfering with each other in some way. Which enemy HP bar script are you using exactly?
  8. Neon Black said:
    The enemy HP bar and Battle HUD scripts are probably interfering with each other in some way. Which enemy HP bar script are you using exactly?
    They werent yesterday!

    Anyway, im using the "basic" one from "V.M of D.T" so it says in the script anyway. Should I copy it, then remove it, to test if thats it?

    EDIT: I have taken one out, tried it, taken the other, try it, it still doesn't work. :/ I also removed them BOTH, still doesnt work!
  9. Yeah, it does puzzle me that you've having problems now with no changes to the script. Were you testing it yesterday in battle test in the database? Try removing the most recent script you added, save your project, and test it.
  10. If you create a new project, then copy in those additional scripts from your current project (not from where you originally got them) does the issue still happen?
  11. Neon Black said:
    Yeah, it does puzzle me that you've having problems now with no changes to the script. Were you testing it yesterday in battle test in the database? Try removing the most recent script you added, save your project, and test it.
    There HAS been NO recent scripts, apart from those two, and I have taken them out and tested. NO reason. Yesterday no I did not test it in the databse, i was playing the game of its actual file found in the folder.

    What does "undefined method" even mean? and it seems to be suggesting there is something wrong with the + in the script. I dont understand.
  12. Shaz said:
    If you create a new project, then copy in those additional scripts from your current project (not from where you originally got them) does the issue still happen?
    Just tested it... and YES your right! A clean project with these scripts in, causes the error, the exact same one.

    If i then take ALL three scrips out, the issue is resolved. Thats in this clean project.

    I removed the HUD display script, and the HP Bar one, and exchanged them for the Change Display Guage script from Pac-Man, yet the same error is occuring.
  13. So when you took our the pac-man script it still gives the error?
  14. The important part of the message is not "undefined method" - it's "for nil:NilClass". It means you're trying to do something on an object that hasn't been instantiated yet. One of those scripts is trying to do something to a battler, but the battler has not been set up yet, by the looks of it.

    Have you made any changes to those scripts since you originally got them? If so, go and grab them again from their original source, and put them in your "new" project, and see if the error still happens.

    Or if you want to zip up (don't encrypt) your new project and post a link, I'll take a look at it.
  15. nevfx said:
    What does "undefined method" even mean? and it seems to be suggesting there is something wrong with the + in the script. I dont understand.
    It means that the line is trying to do something that's not recognized. The portion of that before the '+' should return a FixNum value, but for some reason it's returning 'nil' instead. If those other two scripts and even a third script all get the same error, it must be the difficulty script giving you the error, or so I would assume. I haven't really looked at any of those scripts.

    Also, when I say "remove the most recent script" I mean remove the last one you added whenever you added one. This is one of the most basic troubleshooting tactics. Once again, I don't know why you were not getting issues before with all three of those scripts, though in any case I'd always guess it was the last script added that broke anything.
  16. I think it's the difficulty script causing issues. If it's the one I think you're using, that one boosts enemy parameters which is where the error seems to be occurring.
  17. You didn't follow the instructions. -_-

    # 2) A difficulty must be selected before the first battle or the game WILL# CRASH.