View Single Post
  #4   Spotlight this post!  
Unread 29-01-2008, 09:25
Chaos in a Can Chaos in a Can is offline
Joel Spadin
FRC #1736 (Robot Casserole)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Peoria, IL
Posts: 58
Chaos in a Can is an unknown quantity at this point
Send a message via MSN to Chaos in a Can
Re: Program a motor to turn on and off every other second.....

Quote:
Originally Posted by Tom Line View Post
You can't have two else statements like that.
Look at the code again.
It's lost its indentation, so it's hard to see, but the code is perfectly fine.
The second else belongs to the first of two if's.


I'm guessing the problem is not in line 232, but somewhere before that line.
The compiler was expecting something like a semicolon at the end of a previous line, but didn't complain about it until it found the start brace in line 232, which it wasn't expecting.
Look over the code just before "void code()".
__________________
2006 Xerox Creativity Award
2007 General Motors Industrial Design Award
2008 Judges' Award
2009 Chrysler Team Spirit Award