I cant get voidloop to work

I have a problem were for some reson void loop wont work heres my code

#include <Servo.h>
void setup() {
 myservo.attach(9);
 Serial.begin(9600);
}
void loop() {
  if(Serial.available() > 0){
 state = Serial.read();
 flag=0;
  }
  if(state == 0);{
  myservo.write(90);}
  if (flag == 0){
    Serial.println("Curtains Closed");
  }
  if (state == 1);{
  myservo.write(-90);}
  if (flag == 0){
    Serial.println("Curtains opened");
  }

}

This is what I get:

BT_Cartons:3: error: ‘myservo’ was not declared in this scope

Any sugestions

You do realize that you have two void loop( ) ?

You also have else if (state == 1);

All sorts of "bad" things going on in your code.

You need to post all your code.
If that is all your code you need a setup function.
Void is not part of the name it is just the loop function. All functions must have unique names.