afmotor saying "servo does not name a type" I have made a sumobot with an arduino, an afmotor shield and a 4-pin ping sensor when I upload my code it keeps giving me this error: "'Servo' does not name a type" here is my code.
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