Controlling 2 servos with motor shield

I am having some trouble controlling 2 servos with my arduino motor shield. I am getting some unexpected errors in my code. I am trying to control the servos using the serial monitor window. I got my code from the video Two servo motors control through Arduino serial - YouTube

I understand the ServoTimer.h command does not work, and i have tried changing it to Servo.h but that have not worked. Can anyone please help me figure this out or provide another way (code) of controlling 2 servos with the motor shield. The code it below.

Thanks

/* two servo controller
serial input format
  protocol;motor_number=angle
  ex: 1=180@ or 2=56@
*/

#include <ServoTimer1.h>

ServoTimer1 servo1;
ServoTimer1 servo2;
int inByte = 0;
char buf[256];
char stopByte='0';

void setup()
{
  delay(500);
  Serial.begin(9600);
  servo1.attach(10);
  servo2.attach(9);
  Serial.println("I am ready")
}

void loop()
{
  int i=0
  while(true){
    if (Serial.available() > 0) {
      inByte = Serial.read();
      if(inByte==stopByte){
        buf[i]='\0';
        break;
      }
      buf[i]=inByte
      i++
      Serial.print("I received: ");
      Serial.println(inByte);
    }
  }
  Serial.print("I received string: ");
  Serial.println(buf);
  char motor = buf[0];
  
  int k = 2
  while(buf[k] != '\0'){
    buf[k-2] = buf[k];
    k++;
  }
  buf[k-2] = '\0';
  int angle=atoi(buf);
  
  if(motor == '1'){
    Serial.print("Motor is 1, and angle is: ");
    Serial.println(angle);
    servo1.write(angle);
  }
  else if(motor == '2'){
    Serial.print("Motor is 2, and angle is: ");
    Serial.println(angle);
    servo2.write(angle);
  }
}

Moderator edit: I took the italics out of your code using CODE TAGS. I hope you don't mind.

I am having some trouble controlling 2 servos with my arduino motor shield.

Start by detaching the motor shield. Put it in a drawer. Close and lock the drawer.

Now, connect the servo + to the battery plus, the servo - to the battery minus. Connect the Arduino ground to the battery minus. Connect the servo control wires to two digital pins.

No shield needed.

No idea what ServoTimer is, or why you think you need it. Servo is all that you need.

Thanks for the help, but it still will not allow me to upload the code.

wrightone:
Thanks for the help, but it still will not allow me to upload the code.

Who is "it" that won't let you upload code? Mom? Dad? Space alien?

error message

Seems to be gramatical errors...

Serial.println("I am ready")
...
int k = 2

Each line has to end in a ;

Also, make sure your { and } line up.