unexpected primary-expression before ';' token I'm new to the Arduino world and am working on a sketch to run a servo up and down with a spdt switch.
 My code is :

include #include&lt;Servo.h&gt;
int pos = 0;

Servo myservo;
void setup() {
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  myservo.attach(9);
}
void loop() {
  if (digitalRead(2) == HIGH &amp;&amp; pos &lt; 180) {
    pos++;
    servo.write(pos);
    delay(15);
  }
  if (digitalRead(3) == HIGH &amp;&amp; pos &gt; 0) {
    pos--;
    servo.write(pos);
    delay(15);
  }
}


When I compile I get the "unexpected primary-expression before ';' token" error with exit status 1.

What am I doing wrong???
1) You should be using:

myservo.write(pos);


instead of

servo.write(pos);


for all of your  methods.

2) Change:

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


to 

#include &lt;Servo.h&gt;


This code only verifies when it is run on certain boards*, so make sure you are using one of those boards.Good luck and welcome to the Arduino world!:)

*Verify that your board will work, I know Mega, Uno and Nano will function properly.

P.s. Here is the whole code in correct format:

#include &lt;Servo.h&gt;

int pos = 0;

Servo myservo;
void setup() {
 pinMode(2, INPUT);
 pinMode(3, INPUT);
 myservo.attach(9);
}
void loop() 
{
  if ( (digitalRead(2) == HIGH) &amp;&amp; (pos &lt; 180)) {
    pos++;
    myservo.write(pos);
    delay(15);
  }
  if ( (digitalRead(3) == HIGH) &amp;&amp; (pos &gt; 0)) {
    pos--;
    myservo.write(pos);
    delay(15);
  }
}