error: expected unqualified-id before numeric constant This comes up at the start of every code i write after i try to upload it What on earth does it mean ????? :o :-? :'(
It's an error like a missing semi-colon or an extra curly bracket or something similar that has got the compiler mixed-up. Can you post an example of the code that generates it?
- // Configre the led's
- int redLed = 12;
- int yelLed = 11;
- int grnLed = 10;
- int redManLed = 9;
- int grnManLed = 8;
- // Program variables
- int lightState = 0;
- int crossingRequestSwitchPin = 6; // The pin our crossing button is connected to
- int switchStatePin = 6;
- // Traffic Light Variables
- int timerDelayTime = 5000; // The ms between each light change when running in timer mode
- int crossingTime = 5000; 16.
This is a shot in the dark. Try...
Adding a blank line to the top of the file
Ensure there is nothing suspicious at the bottom of the file
Using /**/ for comments instead of //
If you can, open the file in a different editor an ensure the line terminators are consistent (all CR or all CRLF)
Good luck, Brian
Are you putting line numbers in the code?
Yes, Tommy95 is putting line numbers in his code, I just ran a test
with his code as presented. He needs to upgrade to TommyXP or
Tom, remove the line numbers – they are not needed nor desired!
Thanks all i took out the numbers and uploaded the code again it all workes now :)