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 (http://downloads.chaos-project.com/scripts/Easy%20LvlUp%20Notifier.txt).
The line it points to is:
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.
Are there any other scripts that modify the method start_phase5 without aliasing it?
Not that I see. I'd be glad to send you my scripts though.
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?
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 (https://www.dropbox.com/s/kf8x6e0t2tg6ni0/Scripts.rxdata?dl=0)
Well not quite it seems.
(http://puu.sh/drdM1/f8e1c9f46a.png)
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 (http://forum.chaos-project.com/index.php/topic,23.0.html) topic and placed TONS above your scripts.
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.
So...is it fixed or what?
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?
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.
So would it work if I had:
TONS
GoldXP
Extra
Level Notifier?
Thanks again