Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Wrong Number of Arguments?

I've just started learning ruby and have run into many problems but I really dont know what a certain error message means. I don't know what im doing I just basicly copy and paste other codes together and do a bit on my own so if u could tell me how to fix my CMS I would be very gratful.

Link to game download.

Error Message Picture
http://i1.tinypic.com/2074ayf.png[/IMG]

Thank You!


*Edit
Here is the section of code near line 1840.

# Make Window Farm Stats
@farmstat_window = Window_Status2.new
@farmstat_window.x = 160
@farmstat_window.y = 0



and here is Window_Status2
Code:
class Window_Status2 < Window_Base
  def initialize
    super(170, 5, 300, 345)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = 18
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  def refresh
self.contents.clear
    draw_actor_parameter(@actor, 4, 50, 0)
    draw_actor_parameter(@actor, 4, 67, 1)
    draw_actor_parameter(@actor, 4, 84, 2)
    draw_actor_parameter(@actor, 4, 101, 3)
    draw_actor_parameter(@actor, 4, 118, 4)
    draw_actor_parameter(@actor, 4, 135, 5)
    draw_actor_parameter(@actor, 4, 152, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(4, 182, 96, 32, "Equipment:")
    self.contents.font.size = 13
    draw_item_name($data_weapons[@actor.weapon_id], 4, 212 + 3)
    draw_item_name($data_armors[@actor.armor2_id], 4, 247)
    draw_item_name($data_armors[@actor.armor4_id], 4, 282 - 3)
    draw_item_name($data_armors[@actor.armor1_id], 134 + 15, 212 + 3)
    draw_item_name($data_armors[@actor.armor3_id], 134 + 15, 247)
  end
end
#----------------------------------------------------------------------------
  def refresh
    self.contents.clear
      actor = $game_party.actors[0]
      draw_actor_battler(actor, 60, 180)
    end
 
':| Wow I'm really sorry about this thread I copied that from another script and i kinda forgot to take that out when I re-copied after trying to fix another problem which I still haven't fixed BTW.

So Instead of posting a new thread I'd like to ask for a bit more help.

This is a picture of error message.
http://i1.tinypic.com/2076n88.png[/IMG]

I am using the default Window_Base and I use the parameter's in Window_Status2 show in the first post.
I would like 2 point out that this is a section of code from another script so that might be the problem.
 
Just leave it as it was and change the
Code:
@farmstat_window = Window_Status2.new

to

Code:
@farmstat_window = Window_Status2.new($game_party.actors[index])

Just change the index with the actor's index. For example for th first character in the party insert a 0 for the index etc.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top