• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED number of arguements in a script "error"

GML:
/// @desc approach (min, max, inc);
/// @param min;
/// @param max;
/// @param inc;

function approach(){
if (argument0 < argument1) return min(argument0 + argument2, argument1);
return max(argument0 - argument2, argument1);
}
Can anyone tell me why Gamemaker gives me a little yellow warning sign saying "number of arguments expected 0, got 3"?

The script works fine but the little warning icons are annoying.
 

chamaeleon

Member
Why not provide the arguments in the function declaration instead of using the old-fashioned argumentN version? Ideally using names that don't clash with built-in names, of course.
 
Top