|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Program a motor to turn on and off every other second.....
You can't have two else statements like that.
It's if else if else If you need it longer, it's if else if else if else if else |
|
#2
|
|||||
|
|||||
|
Re: Program a motor to turn on and off every other second.....
Look for a missing semicolon or close brace on the line immediately before what you've shown us. If you don't see anything wrong, consider attaching the entire user_routines.c file so we can look through it.
|
|
#3
|
||||
|
||||
|
Re: Program a motor to turn on and off every other second.....
THANKS TO ALL FOR HELPING ME! YOU GUYS ARE GREAT!
|
|
#4
|
|||
|
|||
|
Re: Program a motor to turn on and off every other second.....
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()". |
|
#5
|
||||
|
||||
|
THANK YOU TO ALL WHO HELPED ME.. IT WORKS NOW!!! THANK YOU AGAIN!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Turn off outlining? | Justin M. | Inventor | 11 | 01-02-2007 09:16 |
| How fast does the Solenoids turn on and off? | Generalx5 | Robotics Education and Curriculum | 2 | 26-01-2007 01:09 |
| Anyone know how fast the Solenoids on the MINI RC can turn on and off? | Generalx5 | Control System | 1 | 06-01-2007 07:39 |
| Program machine to turn and stop | CharlieWilken | Programming | 1 | 19-02-2004 12:50 |
| hanging off off other robots that are hanging off the horiz bar | Andrew Dahl | Rules/Strategy | 15 | 12-01-2004 19:14 |