I have an error with ,,expected primary-expression before ')' token,, Pls help

#include <Servo.h>
#include <NewPing.h>

NewPing sonar (10, 11, 20); // First pin is trigger pin, second pin is echo pin, maximum distance

Servo myservo; // define servo name

void setup()
{
myservo.attach(8); // pin to wich servo is attached
myservo.write(0); //reset servo to starting position
myservo.detach(); //to avoid any random movements, detach servo
delay(50);
}
void loop()
{
if (sonar.ping_cm()>1) // if there is any mtion detected
{
myservo.attach(8);
myservo.write(90);//move servo by 90 degrees
delay(1000);//keep lid open for one second

//If an object is present continuasly:
do
{
delay(1000); //keep lid open for 1cm
}
while (sonar.ping_cm()!=0); //as long as there is an object present

}
myservo.write(0);
delay(2000: <-------This is where it points that the error is
myservo.detach();

}

delay(2000:

or

delay(2000); ???

delay(2000:

No

Do you see any difference in these statements?

delay(50);
delay(1000);
delay(1000);
delay(2000:

What do i do?

How about make the one that looks different, look like the others?

Punctuation and spelling are really important in C/C++ programming. If it's supposed to have () brackets you have to put them in. Leave one out and you get errors (as you've seen).

Steve

slipstick:
Punctuation and spelling are really important in C/C++ programming. If it’s supposed to have () brackets you have to put them in. Leave one out and you get errors (as you’ve seen).

Steve

Not to mention using colons in place of semi-colons.