NoMethodError

Discussion in 'RGSSx Script Support' started by YasterGoodman, Jan 18, 2015.

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

    YasterGoodman Villager Member

    Messages:
    12
    Likes Received:
    0
    First Language:
    English
    I got this strange error that won't seem to go away, no matter what I do.

    [​IMG]

    Here is line 187 of the Game_BattlerBase script:

        feature_objects.inject([]) {|r, obj| r + obj.features }

    To me, it's not clear what's actually gone wrong (as an admitted noob to the program. This is my first project), except for the fact that there are brackets that seem to be empty. I tried searching this topic elsewhere but it seems like everyone else who gets a similar error has used scripts of some kind. I don't have any custom scripts, and I haven't even edited any of the script at all. This error occurs after this sequence of things, if this information is any help at all: First, the player is transported into the room. An event in the room then sets the character's move route, shows some text, then initiates a battle. Immediately after the battle, some more lines of dialog appear and the event is deleted via a self switch. The character has free movement at this point, and there is another event in the room that shows some more text, adds a party member, and transports the player to a new map. After being transported, trying to move in any direction or opening the menu will cause this error to appear. 

    If anyone has any idea of what to do, help is greatly appreciated.
     
    Last edited by a moderator: Jan 18, 2015
    #1
  2. Another Fen

    Another Fen Veteran Veteran

    Messages:
    530
    Likes Received:
    244
    First Language:
    German
    Mmmm, did you delete some database entries recently? It seems either one of your actors or enemies (if you are setting up a troop for battle) refers to a feature item that does not exist in the current database.

    Is there a chance you added a state or changed an actors class to something that does not exist in the database anymore? Are you using an old savestate for testing?
     
    Last edited by a moderator: Jan 18, 2015
    #2
    bloodfayte likes this.
  3. YasterGoodman

    YasterGoodman Villager Member

    Messages:
    12
    Likes Received:
    0
    First Language:
    English
    Yeah, that might do it. I did clear several database entries for enemies and classes so I could build them up and balance them from scratch, but I made sure that the enemy in the battle does exist and the class I still have has features. I didn't add any states or change the classes of anything, but I did transport immediately after or at the same time as I added a party member. That's the point after which the error happened. I am using an old save state for testing. I figured it would be easier to test certain areas of the game like that rather than playing through the beginning. I'll try fixing some of the things you mentioned and test it without a save state and see if that helps.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,627
    Likes Received:
    6,574
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    No, old saves can create a lot of problems when there are greater changes in the project.


    Some of the game data needs to be stored in the savefile to function correctly, and if the save file contains references to objects that have been removed from the database after the save, it can cause problems.


    Or if you add scripts and then use old save games it could also cause problems depending on the script.


    It's always better to start a new game after a lot of changes - and if you don't want to play through the entire game again, use a special event for playtest that transfers your actors to the map you want to go to (and upgrades them for that area.
     
    #4
  5. Shaz

    Shaz Veteran Veteran

    Messages:
    37,800
    Likes Received:
    11,507
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm guessing you might have some new scripts in there, and one of them is not right.


    In this case, the error happens on that line, because something required for that method is not set up. This means the problem is not actually on the line given, but somewhere further back in the list of calls.


    What scripts do you have, are there any that you've recently added or modified?


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

    YasterGoodman Villager Member

    Messages:
    12
    Likes Received:
    0
    First Language:
    English
    I stated in the original post that I haven't added or modified any scripts. I've mostly been working with the database.
     
    #6
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,800
    Likes Received:
    11,507
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Then it seems you're possibly trying to do something with an actor or an enemy that you haven't actually set up.
     
    #7
  8. YasterGoodman

    YasterGoodman Villager Member

    Messages:
    12
    Likes Received:
    0
    First Language:
    English
    Well, I tried testing it again, this time without loading a save state. There was no error. Thank you, Another Fen. The save state was the problem.
     
    Last edited by a moderator: Jan 18, 2015
    #8
  9. bloodfayte

    bloodfayte Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    english
    Thank you, I also had similar problem that was becoming frustrating. But looking at your comment I realized it was because I was using an older save state for editing purposes that caused that problem..  Thank you again, now I'm back to working at it again..
     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,800
    Likes Received:
    11,507
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    bloodfayte, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
     
    #10
Thread Status:
Not open for further replies.

Share This Page