setServoTarget and motor speed?


The help at says that the setServoTarget function takes three parameters.

This command tells the robot to move an specific distance. It will move the motor relative to the motor encoder’s current value. The command needs three pieces of information:

  • The port the motor is plugged into (motorPort).
  • The relative distance to travel (position).
  • The speed the motor will travel (speed).

On the same page it says there are are ***two ***parameters: nMotorIndex and nPosition.

The examples then show a three parameter call:
setServoTarget(motor1, 1000, 50);

The three parameter approach does not compile. The two parameter approach of setServoTarget(nMotorIndex , nPosition) does compile. So… how do I set the motor speed when using the setServoTarget function?