Getting an odd error I've never seen before after killing something

Started by firevenge007, December 11, 2014, 09:11:22 pm

Previous topic - Next topic

firevenge007

So with winter break here, I decided I wanted to spend a little more time further developing my game. But recently, when I try to kill a monster successfully, and after pressing enter once the loot screen appears, I get an error:
Script 'LevelNotifier' line 307: NoMethodError occured.
undefined method 'size' for nil:NilClass


It redirects me to the script I've used which is "Easy LvlUp Notifier by Blizzard". The script can be found here: http://downloads.chaos-project.com/scripts/Easy%20LvlUp%20Notifier.txt.

The line it points to is:
    if @skill_texts.size > 0

I'm not very familiar with ruby, but after looking through the code, the only other instance I see of texts is on line 274 through 284:
def start_phase5
    start_phase5_lvlup_later
    @skill_texts = []
    $game_party.actors.each {|actor|
        actor.remove_states_battle
        if @lvlup_data[actor][0, 7] != [actor.level, actor.maxhp, actor.maxsp,
            actor.str, actor.dex, actor.agi, actor.int]
          @pending_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
          @skill_texts.push('')
          new_skills = actor.skills - @lvlup_data[actor][8]
          if new_skills.size > 0
            new_skills.each {|id|
                @skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}
          end
        elsif @lvlup_data[actor][7] != actor.exp && !NO_EXP_DISPLAY
          @moving_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
        end}
  end


I'd really appreciate if anyone had the time to tell me what the problem is exactly. I'm thinking that it has to do with other scripts interfering, but even if I place the class higher up in the list of classes, nothing seems to change.

Thanks for your time.

KK20

Are there any other scripts that modify the method start_phase5 without aliasing it?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

firevenge007


KK20

Yeah you can send me the scripts file.
But you did do CTRL + SHIFT + F and searched for def start_phase5 and checked to see if any of them had an alias before the method declaration?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

firevenge007

Yes I tried that.

Here are my scripts. Thanks for looking into this. It's quite mysterious since I haven't touched it since the beginning of the schoolyear.
https://www.dropbox.com/s/kf8x6e0t2tg6ni0/Scripts.rxdata?dl=0

KK20

Well not quite it seems.
Spoiler: ShowHide

Multi-Drop is rewriting start_phase5 without an alias. Any scripts placed above it that defines start_phase5 will be ignored/completely wiped out. Your LevelNotifier is currently above it.

Plus, you really should have seen Blizzard's script order topic and placed TONS above your scripts.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

firevenge007

I put it at the top to see if it would change anything, which it didn't and I didn't bother to move it back to the bottom where it was originally.

KK20


Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

firevenge007

Having it at the bottom did not work nor did it at the top. I'm not sure how it would be fixed if it were to be put at the bottom again?

KK20

Well I just tried moving the Level Notifier below TONS and it seemed to work. Going to try moving TONS up now.

EDIT: Okay, you have two other scripts that completely rewrite start_phase5 without an alias, found in 'GoldXP' and 'Extra' scripts. As such, you have to make sure Tons and those two scripts are placed above the Level Notifier script.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

firevenge007

So would it work if I had:
TONS
GoldXP
Extra
Level Notifier?

Thanks again