Encoder motor problem

Hello! we have put motor encoders on our robot and used them for our auton code but for some reason it has stopped our robot from working completely, for the time being we are using a time based auton, does anyone know what might be happening?Here's the code stopping our robot from working:{ nMotorEncoder = 0;

is a syntax error. Conditionals in C languages need parentheses () around the conditional. You have a trailing parenthesis, but did not include the leading one. The same problem on this line:

if nMotorEncoder == tickGoal)

After you fix those two, you will find that the logic flow of the program also doesn't work. Both if and while will control the execution of the following statement, or block of statements denoted by a pair of {curly braces}. The statement immediately after your while is only motor[RFW] = 60; and the statement after your if is only motor[RFW] = 0;. None of your {curly braces} here actually do anything, except maybe the outermost set, whose context is not provided in your snippet.

I'm also not seeing how nMotorEncoder is supposed to change, so I think that your while loop will block forever and never terminate.

is a syntax error. Conditionals in C languages need parentheses () around the conditional. You have a trailing parenthesis, but did not include the leading one. The same problem on this line:

if nMotorEncoder == tickGoal)

After you fix those two, you will find that the logic flow of the program also doesn't work. Both if and while will control the execution of the following statement, or block of statements denoted by a pair of {curly braces}. The statement immediately after your while is only motor[RFW] = 60; and the statement after your if is only motor[RFW] = 0;. None of your {curly braces} here actually do anything, except maybe the outermost set, whose context is not provided in your snippet.

I'm also not seeing how nMotorEncoder is supposed to change, so I think that your while loop will block forever and never terminate.