Help !!!

Just ran it through a formatting routine in Eclipse. It looks like this line is not closed:

else if ( (!rc_dig_in16) || (!rc_dig_in15) ) // for position 15 or 16
{

Try adding the extra brace back wherever it should be, probably at the end. Either way, a brace is missing.

Eclipse is… useful? On our school computers, it’s just plain slow.

The problem is actually, I have tried to compile on another laptop with the same codes and it worked.

What’s the problem here ?

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 mean that I use the same codes on the other laptop and it worked. Thus, It means there shouldn’t be anything wrong with the codes

Why doesn’t it work on my computer ?

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?

where should i put the brace ?

The brace should close this line:

else if ( (!rc_dig_in16) || (!rc_dig_in15) ) // for position 15 or 16
{

I think this ends at the end of the function? If I understand what your code does, put it before this, assuming its where that if ends:

/*Bob's Code ends*/
}

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