'Cache' line 88: "NoMethod Error"

Discussion in 'RPG Maker VX Ace' started by Ivan_the_Terrible, Jul 15, 2018.

  1. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    Greetings, fellow bipeds! I seem to be running into more problems as of late.

    I got the wild hair to go back and alter an area in my game that I had originally finished with some months ago. I added a new side quest, complete with a new playable character. When the player completes the new area, they meet the new character. Then, using control variables and a conditional branch, I created a scenario that changes depending on how many party characters already exist. If the party has five members or more, the choices the player gets are a) help the new character with a problem or b) let the new character deal. If the party has four members or less, the choices the player gets are a) new character joins, or b) new character gets turned away.

    That part goes just fine. It's what happens AFTER the new character joins the party that things get weird. I set this character up in the database just the same as all the others, so I had no reason to think there was anything wrong. But... if this character gets killed in battle, the game crashes.

    I *AM* using the ghost followers script I had inquired about sometime back, but even when I removed that script just to test things out, the game STILL crashed when this particular character got killed. This never happens with any of the other party characters or the main character. Just this new one.

    Every single time the same error message appears following the crash:

    I deleted my save file and started a new playthrough from the very beginning, just to see if that would have any effect. It did not. The game continues to crash whenever the new character is killed. I have no idea why this happens. I've looked through the database, the event containing all the script for the meeting with the character, and anything else I could think of... and I got nothing. I can't understand why this is happening. Can anyone here think of anything I could possibly try (besides the obvious "never let the character die") that would fix this issue? Thanks in advance!
     
    #1
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,295
    Likes Received:
    4,840
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    If you want a fool proof. Add this.
    Code:
    module Cache
      def self.load_bitmap(folder_name, filename, hue = 0)
        if filename.nil?
          return empty_bitmap
        end
        @cache ||= {}
        if filename.empty?
          empty_bitmap
        elsif hue == 0
          normal_bitmap(folder_name + filename)
        else
          hue_changed_bitmap(folder_name + filename, hue)
        end
      end
    end
    
    See if you game is 'glitched' but not crashed.

    If you want to actually debug it. Add this script
    https://github.com/theoallen/RGSS3/blob/master/Untranslated/Script Backtracer.rb
    Then, instead of adding one above, add this instead
    Code:
    module Cache
      def self.load_bitmap(folder_name, filename, hue = 0)
        if filename.nil?
          backtrace
          return empty_bitmap
        end
        @cache ||= {}
        if filename.empty?
          empty_bitmap
        elsif hue == 0
          normal_bitmap(folder_name + filename)
        else
          hue_changed_bitmap(folder_name + filename, hue)
        end
      end
    end
    
    My script will print a log file to trace script that might cause the issue.
     
    #2
    Ivan_the_Terrible likes this.
  3. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    To clarify: do I put that in the Cache script, replacing the segment that was originally there, or do I put it between Materials and Main?
     
    #3
  4. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,295
    Likes Received:
    4,840
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    While actually it doesn't matter as long as it's below 'Cache', always put in 'Materials' section for easier to organize.
     
    #4
    Ivan_the_Terrible likes this.
  5. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you! I'll try it and let you know what happens!
     
    #5
  6. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay, I plugged your scripts in, and when the character was killed in battle, the game crashed again, this time delivering the following message:

     
    #6
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,295
    Likes Received:
    4,840
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    lol, idk how it turned that way. If it doesn't work, try to set
    Code:
    OpenFile = false
    It should create a file on your game folder when the game is supposed to crash.
     
    #7
  8. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    You, my friend, are a genius!

    I did as you said and play-tested the game. Here's what happened this time:

    When the character was killed, the game kept going, except instead of displaying a ghost like the other characters, there was simply no character there. (When I resurrected the character, she returned with no problems.) Then I let a battle end with her dead, and she showed up on the map as a ghost like she was supposed to! So I resurrected her, and again, no problem!

    The one thing I did notice was the computer started to lag quite a lot during the battle when she was dead (and then ran smoothly when she was revived), but I can live with that if it means the game doesn't crash. I don't know precisely what your script did, but it worked! Thank you!!
     
    #8
  9. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,295
    Likes Received:
    4,840
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    LOL, if you're not interested to actually debug it, then remove my backtracer script.
    And remove line 4 from module cache script. It's not important. It will take away your slight lag.
     
    #9
  10. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    Here is the report I got from your backtrace script:

    I'm afraid I don't understand what it is telling me.
     
    #10
  11. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,295
    Likes Received:
    4,840
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    There you have it. It seems it has to do with Lune Frontal Battle System. But idk what script is that and how it works. Maybe you can try to report to the scripter if they're still active?
     
    #11
  12. Ivan_the_Terrible

    Ivan_the_Terrible Devil Hunter Member

    Messages:
    25
    Likes Received:
    3
    Location:
    U.S.A.
    First Language:
    English
    Primarily Uses:
    RMVXA
    I will attempt to contact them. Thank you!
     
    #12

Share This Page