Car Indicator

 int red1 = 10;
int yellow1 = 9;
int green1 = 8;
int button1 = 12;
int red2 = 6;
int green2 = 7;
int yellow2 = 5;
int button2 = 13;
int buttonState = 0;

void setup() {
  pinMode(red1, OUTPUT);
  pinMode(yellow1, OUTPUT);
  pinMode(green1, OUTPUT);
  pinMode(button1, INPUT);
  pinMode(button2, OUTPUT);
  pinMode(red2, OUTPUT);
  pinMode(green2, OUTPUT);
  pinMode(yellow2, OUTPUT);
}
void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(button1);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(red1, HIGH);
    digitalWrite(yellow1, HIGH);
    digitalWrite(green1, HIGH);
  }
  else {
    // turn LED off:
    digitalWrite(red1, LOW);
    digitalWrite(yellow1, LOW);
    digitalWrite(green1, LOW);
  }
 {
  // read the state of the pushbutton value:
  if (buttonState = digitalRead(button1);

      // check if the pushbutton is pressed.
      // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) 
    // turn LED on:
    digitalWrite(red1, HIGH);
      digitalWrite(yellow1, HIGH);
      digitalWrite(green1, HIGH);
    }
    else {
      // turn LED off:
      digitalWrite(red1, LOW);
      digitalWrite(yellow1, LOW);
      digitalWrite(green1, LOW);
    }

}

void changeLights() {

}

My error is expected " ')' before ';' token ". When i fix it, the error expected " primary-expression before ')' "token appears. Pls help.

I have fixed the mistake but i found another. I would really like help in fixing it

 int red1 = 10;
int yellow1 = 9;
int green1 = 8;
int button1 = 12;
int red2 = 6;
int green2 = 7;
int yellow2 = 5;
int button2 = 13;
int buttonState = 0;
int buttonState2 = 0;

void setup() {
  pinMode(red1, OUTPUT);
  pinMode(yellow1, OUTPUT);
  pinMode(green1, OUTPUT);
  pinMode(button1, INPUT);
  pinMode(button2, OUTPUT);
  pinMode(red2, OUTPUT);
  pinMode(green2, OUTPUT);
  pinMode(yellow2, OUTPUT);
}
void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(button1);
  buttonState2 = digitalRead(button2);
  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH); {
    // turn LED on:
    digitalWrite(red1, HIGH);
    digitalWrite(yellow1, HIGH);
    digitalWrite(green1, HIGH);
  
  else {
    // turn LED off:
    digitalWrite(red1, LOW);
    digitalWrite(yellow1, LOW);
    digitalWrite(green1, LOW);
  }


  // read the state of the pushbutton value:
  if (buttonState2 = digitalRead(button2);

      // check if the pushbutton is pressed.
      // if it is, the buttonState is HIGH:
      if (buttonState2 == HIGH);
        // turn LED on:
        digitalWrite(red2, HIGH);
        digitalWrite(yellow2, HIGH);
        digitalWrite(green2, HIGH);
  
else {
// turn LED off:
digitalWrite(red2, LOW);
  digitalWrite(yellow2, LOW);
  digitalWrite(green2, LOW);
}

}}

void changeLights() {

}

Check your brackets and drop the semicolon on line 43

Study the examples in the referance carefully;

https://www.arduino.cc/en/Reference/Else

Does your use of If then Else match ?

   // read the state of the pushbutton value:
    if (buttonState2 = digitalRead(button2);  //missing a closing bracket and <<<<<<<<< see more comments below

That is a very unusual way to read the state of an input. I assume that you meant

    // read the state of the pushbutton value:
    buttonState2 = digitalRead(button2);

because just one line of code later you have

        if (buttonState2 == HIGH);  //<<<<<<<<< see more comments below

If you want to combine the two and don’t need to put the state in a variable to be used elsewhere in the program you can use

        if (digitalRead(button2) == HIGH)

or even

if (digitalRead(button2))

MORE COMMENTS
Terminating an if with a semicolon effectively stops the test occurring because the only code executed should the test return true is the semicolon.