Won't compile a simple blink sketch?

Hey guys. I am new at this. I know some C++, although I didnt know I did. Ive done several variations of the blink sketches trying to learn, but this is the first time I havent been able to find a typo or syntax error.

This the code I have written. Can you help me find where I made my mistake?

// set pin numbers
int led1Pin = 22;
int led2Pin = 24;

void setup() {
  //initialize the LED pin as an outpit:
  pinMode (led1Pin, OUTPUT);
  pinMode (led2Pin, OUTPUT);
}

void loop (){
  setLed1 (HIGH); // set led1 to on
  setLed1(LOW);
}

void setLed1() {
  digitalWrite(led1Pin, led1); /* the state of Led1 is determined by
by variable led1 */

if (led1 ==HIGH)   // the state of Led2 is determined by variable led1
  digitalWrite(led2Pin, LOW); // if Led1 is turned on, led2 will be turn off.
else
 digitalWrite(led2Pin, HIGH); // if Led1 is off, Led2 will be turned on.
delay(1000); //wait for a second

}

Error message:Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch_2_3_1two_leds_final.ino: In function 'void loop()': sketch_2_3_1two_leds_final:12: error: too many arguments to function 'void setLed1()' sketch_2_3_1two_leds_final.ino:5:6: note: declared here sketch_2_3_1two_leds_final.ino: In function 'void setLed1()': sketch_2_3_1two_leds_final:17: error: 'led1' was not declared in this scope sketch_2_3_1two_leds_final:25: error: expected ';' before '}' token too many arguments to function 'void setLed1()'

One argument is one too many.

  setLed1(LOW);
}

void setLed1() {

You promised the compiler that “setLed1” wouldn’t be passed any parameters, but you went ahead and passed it a LOW.

One argument is one too many.

That sounds very profound, like Voltaire or Gandalf said it or some thing, but I have no idea where the argument is. My guess is the void loop, but I dont know.

I didn't "write" this code. I typed it out from the tutorials in the kit I bought. I'm new at this.

. I typed it out from the tutorials in the kit I bought.

Then you either mistyped it, or the example was wrong.

Ooooh I see! I dont know what to do about it but I see what youre saying. I deleted it and just got a bunch of other error messages.

Is there a way to fix it? Im having trouble seeing the stack order if you know what I mean. It doesnt appear that it is chronological in the code.

void loop (){
  setLed1 (HIGH); // set led1 to on
  setLed1(LOW);
}

void setLed1()

TheRealVictor: Im having trouble seeing the stack order if you know what I mean.

No, I don't

If you didn't make a whole bunch of mistyping and that's really in that book I would just burn the book....

void setLed1()

The function is defined as not being passed any parameters but in

  setLed1 (HIGH); // set led1 to on
  setLed1(LOW);

You are passing it parameter. No wonder you get errors.

Try this:

void setLed1(int ledState)
{
  digitalWrite(led1Pin, ledState); /* the state of the pin that Led1 is connected to is determined by
by argument ledState */
}