error: too few arguments to function?

Hello again :). Sry to bugg all you nice people again ]:smiley: here but I have a problem with compiling a function that is supposed to acceppt two parameters stop_pin and start_pin and use them to loop through the pins. The code is below.

int switchState = 0;                //
int reset = 0;                      //
int const start_stop_button = 2;    // needs to be set as input port on arduino to controll the start and stop sequence and switch between modes
int const output_start_pin = 3;     // sets start digital pin on arduino
int const output_stop_pin = 10;     // sets stop digital pin number on arduino
int function = 0;                   // variable that decides what kind of light sequence is going to be used
int flash_delay = 50;               // delay between flashes for flash function to part of a second (1000 = one second; 250 = quarter of a second) default 50
int minimum_delay = 150;            // minimum value for delay between each LED turn on and off! Defines how "fast" the light moves (1000 = one second; 250 = quarter of a second) default 150
int maximum_delay = 1000;           // maximum value for delay between each LED turn on and off! Defines how "slow" the light moves (1000 = one second; 250 = quarter of a second)
int button_delay = 20;              // define delay for the button bounce default 20ms

/* Setup output and input pins for arduino.
   Note change values start_pin and stop_pin in the begining of the program,
   if you want to connect/use different arduino digital pins */
void setup()
{
  
  /* Define and initiate pins */
  for(int pin_counter = output_start_pin; pin_counter <= output_stop_pin; pin_counter++)
  {
    pinMode(pin_counter, OUTPUT);
  }
  pinMode(start_stop_button, INPUT);
}

/* Function that checks for input from user on start_stop_button */
int check_the_input()
{
  switchState = digitalRead(start_stop_button);
  if (switchState == HIGH)
  {
    delay(button_delay); // button bounce
    return 1;
  }
  else return 0;
}

/* Function that turns off all LEDs connected from start_pin to stop_pin */
void turn_off_all_LEDs(int start_pin, int stop_pin)
{
  for (int pin_counter = start_pin; pin_counter <= stop_pin; pin_counter++)
  {
     digitalWrite(pin_counter, LOW);
   }
}

/* Function that turns on all LEDs connected from start_pin to stop_pin */
void turn_on_all_LEDs(int start_pin, int stop_pin)
{
  for (int pin_counter = start_pin; pin_counter <= stop_pin; pin_counter++){
    digitalWrite(pin_counter, HIGH);
  }
}

/* Function that flashes all LEDs using flash_delay value as delay between flashes */ 
void flash_all_LEDs ()
{
   turn_off_all_LEDs(output_start_pin, output_stop_pin);
   delay (flash_delay);// wait for flash_delay value (change on the top)
   turn_on_all_LEDs(output_start_pin, output_stop_pin);
   delay (flash_delay);// 
   turn_off_all_LEDs(output_start_pin, output_stop_pin);
}

// main loop - main program 
void loop()
{
  switchState = digitalRead(start_stop_button);
  if (switchState == HIGH && reset == 0 && function == 0)
  {
    switchState = 0;

    /*  */    
    while (switchState == LOW)
    {
      switchState = digitalRead(start_stop_button);
      if (switchState == HIGH)
      {
        delay(button_delay); // button bounce
        flash_all_LEDs();
        flash_all_LEDs();
        function = function + 1;
        reset = 1;
        switchState = 0;
        break;
      }
      switchState = digitalRead(start_stop_button);
    }
}
 
 else
  { // button is not pressed
   //turn off all LEDs
   turn_off_all_LEDs();
   function = 0;
  }

  if (switchState == HIGH)
  {
    delay (minimum_delay);
    reset = 0;
    function = 0;
  }
} // go back to the begining of the loop

Compiler gives me the following error.

Project_20_Loop_multiple_colours_multiple_functions_test_flash.ino: In function ‘void loop()’:
Project_20_Loop_multiple_colours_multiple_functions_test_flash:62: error: too few arguments to function ‘void turn_off_all_LEDs(int, int)’
Project_20_Loop_multiple_colours_multiple_functions_test_flash:117: error: at this point in file

What am I doing wrong here? Why is compiler complaining and what shall be changed to make this compile? Should I have used #define instead of const for those two variables even though reference says const is preffered.
Regards Nik

At one point you call the function without any arguments:

   turn_off_all_LEDs();

That's what the compiler is complaining about.

Pete

Thanks. That seems to fix it. I copied code from the old version and obviously forgot to change this. :) Should go for an eyes exam probably :).