Have you tried adding the extra brace right before the function? That code definitely will not compile as is. The syntax error just means the function before it never closed, so it isn’t anything compiler specific at the moment.
Or are you getting a different error? If so, what is it?
I’ll assume you’re talking about the syntax error. If not, say so.
The code on the other computer must not be identical, as it does not respond to the syntax error which is apparent. I am quite sure it will dissapear (and therefore compile) if you add the other brace. Try that, and see if the problem goes away. If you have already fixed the brace issue, is the syntax error still there?
there is another problem after I solved that problem
It says
Clean: Done.
Executing: “C:\MCC18\bin\mcc18.exe” -p=18F8722 /i"C:\MCC18\h" “autonomous.c” -fo=“autonomous.o” -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.15 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 59
C:\ifi_frc_simple_30\autonomous.c:135:Error [1105] symbol ‘left_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:135:Error [1105] symbol ‘left2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:135:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:135:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:136:Error [1105] symbol ‘right_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:136:Error [1105] symbol ‘right2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:136:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:136:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:160:Error [1105] symbol ‘left_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:160:Error [1105] symbol ‘left2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:160:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:160:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:161:Error [1105] symbol ‘right_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:161:Error [1105] symbol ‘right2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:161:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:161:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:169:Error [1105] symbol ‘left_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:169:Error [1105] symbol ‘left2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:169:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:169:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:170:Error [1105] symbol ‘right_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:170:Error [1105] symbol ‘right2_drive’ has not been defined
C:\ifi_frc_simple_30\autonomous.c:170:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:170:Error [1101] lvalue required
C:\ifi_frc_simple_30\autonomous.c:176:Error [1105] symbol ‘left_drive’ has not been defined
Halting build on first failure as requested.
BUILD FAILED: Sun Feb 03 14:40:41 2008
Okay… Well, did you actually define those? If so, where? Did you include that file’s header? You may want to just attach a zip of your entire code. And what are those two values? Are they supposed to be motor macros or actual variables? Where are they referred to?
Ok, just a few requests
First, when you want others to read your code, indentation helps. Heck, it even helps if you don’t want others to read it. Helps catch closing bracket errors.
Second, when your putting code in, wrap it in code tags CODE] /CODE]
just remove the spaces inside the braces, and put your code in between. much easier to read