I am making a + drive attempted to use this code help, please and if this is not the right way to program an + drive please provide a correct example
//there is a while true line so it’s not that
if (vexRT(Ch1) < 20 && > -20)
{
backdrive = vexRT(Ch3);
fordrive = vexRT(Ch3);
leftdrive = vexRT(Ch4);
rightdrive = vexRT(Ch4);
}
else
if(vexRT(Ch1)<-20)
{
backdrive = vexRT(Ch1);
fordrive = vexRT(Ch1);
leftdrive = vexRT(Ch1);
rightdrive = vexRT(Ch1);
}
else
if(vexRT(Ch1)>20);
{
backdrive = vexRT(Ch1);
fordrive = vexRT(Ch1);
leftdrive = vexRT(Ch1);
rightdrive = vexRT(Ch1);
}
and go these errors
File “mainprogram v.1.c” compiled on Nov 14 2016 15:09:46
Error:Unexpected ‘>’ during parsing
Error:Unexpected ‘20’ during parsing
Error:Unexpected ‘)’ during parsing
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
Error:Unexpected ‘else’. Ignored.
Error:Unexpected ‘if’ during parsing
Error:Missing ‘;’ before ‘{’
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
Error:Unexpected ‘else’. Ignored.
Error:Unexpected ‘if’ during parsing
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable
*Severe:Can’t assign to ‘const’ qualified variable