Exit status 1 can't compile I am a complete beginner with very little knowledge. I am trying to do a switch in Arduino UNO using a guide I found on the internet but it won't compile. The servo motor should function if it is switched on loadstate == HIGH. I have no idea what "exit status 1" is or how to fix it, help.

#include &lt;Servo.h&gt;
    Servo myservo;

    int buttonPin = 3;
    int reading;
    int state = 0;
    int Loadstate = 0;

    int pos = 0;
    int trig = 13; 
    int echo = 11;

void setup() {
  // put your setup code here, to run once:

    pinMode(buttonPin, INPUT);
    pinMode(ledPin, OUTPUT);
    pinMode (trig ,OUTPUT);
    pinMode (echo ,INPUT);
    myservo.attach(7);

}


void loop() {

    long duration, distance;

    digitalWrite (trig, LOW);
    delayMicroseconds (2);
    digitalWrite (trig, HIGH);
    delayMicroseconds (10);
    digitalWrite (trig, LOW);
    duration = pulseIn(echo, HIGH);
    distance = (duration/2) / 29.1;


      reading = digitalRead(buttonPin);

  if (state == 0 &amp;&amp; reading == HIGH){
        state = 1;
        Loadstate = !Loadstate;
  }
  if (state == 1 &amp;&amp; reading = LOW){
        state = 0;
  }

  if (Loadstate == HIGH){
      if (distance &lt;= 30 &amp;&amp; distance &gt;= 0){
          for (pos = 0; pos&lt;90; pos +=1){               

            myservo.write(pos);
            delay(15);
        }

        delay(1000);

          for(pos = 90; pos&gt;=1;pos-=1){
            myservo.write(pos);
            delay(15);
        }
        }
        }   
}
ledPin is not defined. You should define it somewhere.
if (state == 1 &amp;&amp; reading = LOW){ is not valid syntax. You need to use == not = to compare values.