Turning WIth Encoders

does this code look correct for turning with encoders on vex coding studio c++ Pro? When I try to download it is says that fwd is not a member of rotation units. What is the correct way to make a motor turn?

void inchTurn(float target, int speed){
float error = 0;
LM.resetRotation(); //encoder starts at 0 again
RM.resetRotation(); //encoder starts at 0 again
drive(speed, speed, 10);
error=LM.rotation(vex::rotationUnits::rev)3.14 diameter;
error=RM.rotation(vex::rotationUnits::fwd) 3.14 diameter;

@jpearman any advice

isn’t rotationUnits things like deg for degrees?

lol never mind rev means revolutions here not reverse

replace rotationunits::fwd with rotationunits::rev. That should fix your error