Error Messages

I have gotten this error message a couple time saying, "Expected unqualified-id ". Does anyone know how to fix this.

void a_turn(int deg); {
float pi = 3.14;
float roboWith = 25; //measure this at tournament
float wheelCirc = 12; //this too
float vel = 50;
float roboCirc = pi * roboWith;
float turns = roboCirc / wheelCirc * deg / 360;

LeftR.rotateFor(turns, vex::rotationUnits::rev, vel, vex::velocityUnits::pct)
LeftF.rotateFor(turns, vex::rotationUnits::rev, vel, vex::velocityUnits::pct)
RightR.rotateFor(turns, vex::rotationUnits::rev, vel, vex::velocityUnits::pct)
RightF.rotateFor(turns, vex::rotationUnits::rev, vel, vex::velocityUnits::pct)
}

It is the first bracket

On the first line, where you define a_turn() function, you have an unnecessary semicolon between parenthesis and opening brace.

It should be:

void a_turn(int deg) {
//...
}

See the language reference:
https://www.learncpp.com/cpp-tutorial/introduction-to-functions/

1 Like

Thank you so much we really appreciate it!

1 Like