Arduino build error

error: too many arguments to function 'void blink()'

The call passes more values than the function declares. Count the parameters in the function and the values in the call.

  • Build error
  • 2 common causes
  • Seen 487 times in failed builds on Mokxi in the 30 days to November 16, 2026.
The message

What the Arduino IDE prints

Output window
sketch.ino: In function 'void setup()':
sketch.ino:8:10: error: too many arguments to function 'void blink()'
    8 |   blink(3);
exit status 1

Either remove the extra value or add a parameter to the function.

Mokxi's compiler, clang, words it as no matching function for call, or too many arguments to function call.

Causes

The 2 usual causes with the fix

1The function takes no parameters and was given one

Add the parameter to the function so it can use the value.

Broken
void blink() {
  Serial.println("blink");
}

void setup() {
  Serial.begin(9600);
  blink(3);
}

void loop() {
}
Fixed
void blink(int times) {
  Serial.println(times);
}

void setup() {
  Serial.begin(9600);
  blink(3);
}

void loop() {
}

Mokxi’s build tab says: blink is called with values it does not take.

Try this fix in Mokxi

2A comma was typed where a decimal point belongs

In C++ a comma separates arguments. 2,5 is two numbers, 2 and 5. Write 2.5 for a decimal.

Broken
void show(float value) {
  Serial.println(value);
}

void setup() {
  Serial.begin(9600);
  show(2,5);
}

void loop() {
}
Fixed
void show(float value) {
  Serial.println(value);
}

void setup() {
  Serial.begin(9600);
  show(2.5);
}

void loop() {
}

Mokxi’s build tab says: show is called with values it does not take.

Try this fix in Mokxi

FAQ

Questions and answers

What does "too many arguments" mean?

The call has more values between the brackets than the function was declared to take.

And "too few arguments"?

The opposite: values are missing. Add them, or give the function parameters default values.

Does the order of arguments matter?

Yes. They are matched to the parameters by position, so the first value goes to the first parameter.