brushless control

note:w is the letter received from the xbee module w=(HIGH)
can somebody help me to figure out where the error in the program?
ty vm in advance

#include <Servo.h>
Servo myservo;
Servo mybrushless1;

int pos = 0;
int angle = 90;
void setup()
{
  myservo.attach(9);
  mybrushless1.attach(6);
  Serial.begin(9600);
}
void loop()
{
  char x;
  x=Serial.read();
  if(x=='w')
  {
    if(pos <= 30)
    {

      for(pos = 0; pos < 200; pos += 5)
      {
        mybrushless1.write(pos);

        delay(1000);
      }
    }
    else
    { 
      pos = 31;
    }
  }
}

That sketch compiles without error. What does/doesn't it do, that you don't want/want it to?