Too Few Arguments?

Androiddxx

Warper
Member
Joined
Jul 4, 2012
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Hi. I started using the program (RPG Maker VX Ace) a few days ago. Works like a dream! However, I've run into a bit of a snag:

I created some enemies to battle. However, whenever I defeat them, instead of reaping my rewards, I get this error message:

"Script 'BattleManager' line 309: ArgumentError occurred.

too few arguments"

I've compared it to a default script, and as far as I can tell, there's nothing different. It was working perfectly right up until I started messing with the enemy's stats. I tried to change them back, but it won't work, and now it's happening to all of my other enemies as well, even new ones! I've looked at the script, and it appears to be something wrong with the EXP message. I've tried changing the EXP I get, having none at all, everything! And I know little about coding, so I'm afraid of changing things around in there when I don't even know what's going on!

Please, I need help! What kind of RPG doesn't have any monster fights.

It looks like this:



Code:
#--------------------------------------------------------------------------
# ● View of the Experience Aquired
#--------------------------------------------------------------------------
def self.display_exp
if $game_troop.exp_total > 0
	 text = sprintf(Vocab::ObtainExp, $game_troop.exp_total)
	 $game_message.add('\.' + text)
end
end
 

Link

Hero of Slime
Veteran
Joined
Mar 13, 2012
Messages
227
Reaction score
11
First Language
English/Engrish
Primarily Uses
Too few arguments generally means when it's passing a variable, for what ever reason it's not passing the variable at all or properly. Which of the lines are 309? That'd give a little more insight on which line is causing the issue rather than the whole chunk of the code.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Did you change anything in the Vocab module? That's all I can think of since it is an sprintf error.

A lot of new users think that %s, %d, and %f are ugly and will make their messages look wrong so they delete them, having absolutely no clue what they are for and then wonder why things are broken.
 
Last edited by a moderator:

Androiddxx

Warper
Member
Joined
Jul 4, 2012
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Too few arguments generally means when it's passing a variable, for what ever reason it's not passing the variable at all or properly. Which of the lines are 309? That'd give a little more insight on which line is causing the issue rather than the whole chunk of the code.
It's this one:



Code:
   text = sprintf(Vocab::ObtainExp, $game_troop.exp_total)
 

Androiddxx

Warper
Member
Joined
Jul 4, 2012
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Did you change anything in the Vocab module? That's all I can think of since it is an sprintf error.

A lot of new users think that %s, %d, and %f are ugly and will make their messages look wrong so they delete them, having absolutely no clue what they are for and then wonder why things are broken.
That was it. Thanks, friend! I'll be a lot more careful from now on!
 
Last edited by a moderator:

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

Latest Threads

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,859
Messages
1,017,037
Members
137,566
Latest member
Fl0shVS
Top