I am using a Mac with the ElCapitan operating system.
I am in the Spaceship Interface Project.
I have typed in the Sketch according to the Manual.
When verifying the sketch, five errors are reported. A typical error states: "Error: expected unqualified - id before numeric constant".
Then I start over and enter only the first line of the sketch.
1 int switchState = 0; (The int automatically prints in red).
Verifying that gets the same error response.
What is happening? How do I fix it?
Many thanks. cbcademd.
I can see nothing wrong with the code that you have not posted.
I have typed in the Sketch according to the Manual.
What is that 1 doing at the start of
1 int switchState = 0; Is it by any chance the line number ? If so then remove it else explain where it came from.
According to the project book all entries into the Sketch were preceded by a number, thus there were 27 numbered entries. I removed all of those 27 numbers and that cured my problem. Thank you very much. cbcademd.
Hi,
If your IDE doesn't do it already, you can go to Files, Preferences and turn on line numbers.
The IDE then puts line numbers in which helps locating any compiling errors.
The line numbers do not effect the sketch operation or compiling.
Tom... ![]()