Wrong Number of Arguments- compatibility issue.

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
I'm working with a personally modified version of Falcao ABS Pearl and his Mouse system.
https://falcaorgss.wordpress.com/2012/12/02/falcao-pearl-abs-liquid-v1/
https://falcaorgss.wordpress.com/category/mouse-system-buttons-2-5/

I'm using the mouse script to change the direction of the player (though they don't actually move)


Everything was working fine, but when I brought in this formation script:





And now every time the player get's control, the game throws an error.


error.jpg


Line 180 of Game_Character script is:
 


when ROUTE_SCRIPT;            eval(params[0])


When I go into the Game_Character script and comment out line 180, the game doesn't throw the error anymore. But then the character doesn't turn when clicking like before.


Anyone have any ideas what might be causing this and how to fix it?


Thanks!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The issue is a script command you have in a move route command.  It's likely nothing to do with compatibility issues between the scripts you listed.
 
Last edited by a moderator:

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
Hmm... That makes sense. But the route command scripts are needed in order for the formation to work. And this error isn't thrown when the mouse script is inactive so I don't think it's the route scripts in particular. Do the move route scripts just not like working while the mouse script is active?


script set up.jpg
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
that could be anywhere, then.


Can you please go to your Main script and comment out the rgss_main { SceneManager.run } line (I'm assuming you're using Ace), and add this after it:

Code:
#==============================================================================
# The following is for crash debugging only
#==============================================================================
begin
  rgss_main do
    begin
      SceneManager.run
    rescue RGSSReset
      Graphics.transition(10)
      retry
    end
  end
rescue SystemExit
  exit
rescue Exception => error
  scripts_name = load_data('Data/Scripts.rvdata2')
  scripts_name.collect! {|script|  script[1]  }
  backtrace = []
  error.backtrace.each_with_index {|line,i|
    if line =~ /{(.*)}(.*)/
      backtrace << (scripts_name[$1.to_i] + $2)
    elsif line.start_with?(':1:')
      break
    else
      backtrace << line
    end
  }
  error_line = backtrace.first
  backtrace[0] = ''
  print error_line, ": ", error.message, " (#{error.class})", backtrace.join("\n\tfrom "), "\n"
  raise  error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]
end


Enable the console (Game > Show Console) and play.  Then when you get the error, grab a screenshot of the console - make the window wider and longer to fit if necessary.  That ought to tell us exactly where the issue occurs.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
can you go to the Game_Follower script and find line 50?  Can you copy/paste that whole method here, and point out which one is line 50?  I did follow the link in your first post, but there are so many links and downloads and broken links I didn't want to try and find the script (and I don't download whole projects or demos for a single script).  Alternately, you can just copy/paste that whole script here - just make sure you use both spoiler and code tags so the formatting is retained (choose 'no highlighting') and it doesn't stretch the page right out.


Also, can you please go to your Game_Character script and change line 180 to the following:

Code:
 when ROUTE_SCRIPT; p params[0]; eval(params[0])
You can change your Main script back to the way it was - we don't need that anymore.  Then play and grab another screenshot of what's in the console now?


Mmmm ... it concerns me that you have Victor Engine - Follower Options and Game_Follower - it wouldn't surprise me at all if there are conflicts between the two.  Why do you have both of them?  What does the new one do that Victor's doesn't?
 
Last edited by a moderator:

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
Here's the method:
 


#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@move_speed = $game_player.real_move_speed
@transparent = $game_player.transparent
@walk_anime = $game_player.walk_anime
@step_anime = $game_player.step_anime
@direction_fix = $game_player.direction_fix
@opacity = $game_player.opacity
@blend_type = $game_player.blend_type
super
end


Line 50 is "super"


And here's the whole script just in case

Code:
#==============================================================================
# ** Game_Follower
#------------------------------------------------------------------------------
#  This class handles followers. A follower is an allied character, other than
# the front character, displayed in the party. It is referenced within the
# Game_Followers class.
#==============================================================================

class Game_Follower < Game_Character
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(member_index, preceding_character)
    super()
    @member_index = member_index
    @preceding_character = preceding_character
    @transparent = $data_system.opt_transparent
    @through = true
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    @character_name = visible? ? actor.character_name : ""
    @character_index = visible? ? actor.character_index : 0
  end
  #--------------------------------------------------------------------------
  # * Get Corresponding Actor
  #--------------------------------------------------------------------------
  def actor
    $game_party.battle_members[@member_index]
  end
  #--------------------------------------------------------------------------
  # * Determine Visibility
  #--------------------------------------------------------------------------
  def visible?
    actor && $game_player.followers.visible
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    @move_speed     = $game_player.real_move_speed
    @transparent    = $game_player.transparent
    @walk_anime     = $game_player.walk_anime
    @step_anime     = $game_player.step_anime
    @direction_fix  = $game_player.direction_fix
    @opacity        = $game_player.opacity
    @blend_type     = $game_player.blend_type
    super
  end
  #--------------------------------------------------------------------------
  # * Pursue Preceding Character
  #--------------------------------------------------------------------------
  def chase_preceding_character
    unless moving?
      sx = distance_x_from(@preceding_character.x)
      sy = distance_y_from(@preceding_character.y)
      if sx != 0 && sy != 0
        move_diagonal(sx > 0 ? 4 : 6, sy > 0 ? 8 : 2)
      elsif sx != 0
        move_straight(sx > 0 ? 4 : 6)
      elsif sy != 0
        move_straight(sy > 0 ? 8 : 2)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Determine if at Same Position as Preceding Character
  #--------------------------------------------------------------------------
  def gather?
    !moving? && pos?(@preceding_character.x, @preceding_character.y)
  end
end
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I also need the other things I asked for.
 

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
Sorry, must have missed that:

console.jpg


The followers options allows me to have more realistic follower movement if memory serves. I don't NEED it, but I would certainly like to keep it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Are you able to give me a copy of your Scripts.rvdata2 file?  I don't see anything in that script that would cause this issue, so I'm guessing it's another script.  It may be as easy as having the scripts in the wrong order.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
The conflict is between the Mouse System Buttons 2.5 and the Pathfinder script, which both have a method called Find_Path in the Game_Character class.  In that case, I'm not sure why it crashed when you added the Game_Followers script and worked when you removed it ... unless you added/removed one of the other scripts at the same time.


The easiest way to fix it would be to modify the Mouse System Buttons script.  Simply change any reference to find_path in that method, to a different name, like find_new_path.



Line 230: $game_player.find_new_path(@mxx, @myy) unless on_toolbar?


Line 1010: def find_new_path(x, y)


Make those changes, and let me know if it solves the problem.  If it doesn't, please adjust that Main script again, run, and provide another screenshot of the errors.
 

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
Thank you! I'll try it out and let you know if it works!
 

vamuse

Villager
Member
Joined
Apr 13, 2016
Messages
15
Reaction score
1
Primarily Uses
N/A
Sorry for the late response, but as far as I can tell that did indeed fix the problem! Thank you Shaz! You are a gentleman and a scholar!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
glad it worked.  ps - I'm a girl ;)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top