Mr.Trivel Animated Faces (V1.2) Line 97 Argument Error On Level Up

PhoenixX92

The Light Bearer
Veteran
Joined
Jun 28, 2015
Messages
219
Reaction score
95
First Language
English
Primarily Uses
RMMV
So, I went to test this script to see if it worked in battle(it does!) but when my character leveled up, it crashes. Tried it with numerous levels, 1 to 2, 40 to 41, and 98 to 99...
It says "Script 'Mr. Trivel Animated Faces' line 97: ArgumentError occurred.
wrong number of arguments (0 for 2)"


"Refresh" is line 97. I'm no coder/programmer by any means, but shouldn't there be an 'else' in this somewhere? I have no idea what refresh does... Extreme noob here.
If someone could help me fix this, I would greatly appreciate it!


# )--------------------------------------------------------------------------(
# )-- Alias: update --(
# )--------------------------------------------------------------------------(
def update
finish = Time.now
@elapsed_time += ms(@time_now, finish)
mrts_face_anims_update
if @animated_actors && @elapsed_time >= FRAME_SPEED && Time.now.to_f != @time_now
@actor_hash.each { |k, v|
next unless @actor_hash[k]
@actor_hash[k] += 1
@actor_hash[k] = 0 if @actor_hash[k] > DATA[k][1].size-1
}
refresh
@elapsed_time = 0
end
@time_now = Time.now
end




Edit really fast:
I apologize if this is in the wrong section. It's an issue with a script, so I attempted to get it to the right section of the forums.
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
I've moved this thread to RGSSx Script Support . Please be sure to post your threads in the correct forum next time. Thank you.
 

PhoenixX92

The Light Bearer
Veteran
Joined
Jun 28, 2015
Messages
219
Reaction score
95
First Language
English
Primarily Uses
RMMV
Shameless self-bump.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
You should give a link to the script in question. 


The error you got means that the method refresh in that class expects 2 arguments, yet none has been provided.


Either one of your other scripts rewrite that refresh method with 2 arguments, or Mr.Trivel's script misses these arguments.

But why do you bump when not even 10 hours has been passed since you posted the topic? o_O


What is even the point of bumping a topic if it's still on page 1?
 

PhoenixX92

The Light Bearer
Veteran
Joined
Jun 28, 2015
Messages
219
Reaction score
95
First Language
English
Primarily Uses
RMMV
You should give a link to the script in question. 


The error you got means that the method refresh in that class expects 2 arguments, yet none has been provided.


Either one of your other scripts rewrite that refresh method with 2 arguments, or Mr.Trivel's script misses these arguments.

But why do you bump when not even 10 hours has been passed since you posted the topic? o_O


What is even the point of bumping a topic if it's still on page 1?
Here's the link:
http://www.rpgmakercentral.com/topic/27001-animated-faces/


My browser messes up a lot(I'm using Edge) and for some reason a lot of my threads don't show up in the forum list for me. That's totally my fault... I apologize.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
None of the RTP window classes have a refresh method that takes any arguments.  This means you must have another script that's some kind of window, that has a refresh method that requires two arguments.


Do a global search (open your script list and press Control+Shift+F) for def refresh and see what sorts of window classes come up that have arguments after the method name.
 
Last edited by a moderator:

PhoenixX92

The Light Bearer
Veteran
Joined
Jun 28, 2015
Messages
219
Reaction score
95
First Language
English
Primarily Uses
RMMV
None of the RTP window classes have a refresh method that takes any arguments.  This means you must have another script that's some kind of window, that has a refresh method that requires two arguments.


Do a global search (open your script list and press Control+Shift+F) for def refresh and see what sorts of window classes come up that have arguments after the method name.
These are them.
I have a lot... So I'm not sure if you guys are able to help or not due to the list, but even if you can tell me what to look for, that'd be amazing.


Also, on a somewhat related note, I didn't know that search feature existed.


Screenshot_120.png


Screenshot_121.png


Screenshot_122.png


Screenshot_123.png
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
It is Yanfly's Victory Aftermath script, the level up windows are the only ones using 2 arguments.


Try this snippet:

class Window_VictoryLevelUp < Window_Base

def refresh(actor=nil, temp_actor=nil)
if actor && @actor != actor
YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
end
@actor = actor if actor
@temp_actor = temp_actor if temp_actor
contents.clear
reset_font_settings
draw_actor_changes(@actor, @temp_actor)
end

end

class Window_VictorySkills < Window_Selectable

def refresh(actor=nil, temp_actor=nil)
@actor = actor if actor
@temp_actor = temp_actor if temp_actor
contents.clear
if @actor.skills.size == @temp_actor.skills.size
unselect
@data = []
create_contents
return
end
@data = @actor.skills - @temp_actor.skills
if @data.size > 8
select(0)
activate
else
unselect
deactivate
end
create_contents
draw_all_items
end

end



Place it below Yanfly's Victory Aftermath.


It should fix the error you get. 
 

PhoenixX92

The Light Bearer
Veteran
Joined
Jun 28, 2015
Messages
219
Reaction score
95
First Language
English
Primarily Uses
RMMV
It is Yanfly's Victory Aftermath script, the level up windows are the only ones using 2 arguments.


Try this snippet:

class Window_VictoryLevelUp < Window_Base

def refresh(actor=nil, temp_actor=nil)
if actor && @actor != actor
YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
end
@actor = actor if actor
@temp_actor = temp_actor if temp_actor
contents.clear
reset_font_settings
draw_actor_changes(@actor, @temp_actor)
end

end

class Window_VictorySkills < Window_Selectable

def refresh(actor=nil, temp_actor=nil)
@actor = actor if actor
@temp_actor = temp_actor if temp_actor
contents.clear
if @actor.skills.size == @temp_actor.skills.size
unselect
@data = []
create_contents
return
end
@data = @actor.skills - @temp_actor.skills
if @data.size > 8
select(0)
activate
else
unselect
deactivate
end
create_contents
draw_all_items
end

end



Place it below Yanfly's Victory Aftermath.


It should fix the error you get. 
That fixed it. Thank you for this.
No idea how you were able to put that together so quickly with simple screen shots of a list... But that's seriously amazing.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top