afmotor saying "servo does not name a type"
You are creating Servo objects instead of AF_DCMotor objects. Change this:

Servo leftMotor;
Servo rightMotor;


to this:

AF_DCMotor leftMotor(1);   // Change these numbers to the correct motor numbers
AF_DCMotor rightMotor(2);  // you are using on the shield