Go Down

Topic: Where is the error? (Read 874 times) previous topic - next topic

lupiana

Hi,
I used the sketch that I enclose as Picture.
In compiling I get the following error:

leonardo.ino: 6: 2: error: expected unqualified-id before '{' token

How to fix this error?

Thanks

Luigi

Gippopotam

remove ";" in the end of line 2
remove line 4

lupiana

Hi Gippopotam,
I thank you so much. I'll try later.


CrossRoads

Also, add another } at the end of the program. { } and ( ) must be used in pairs:
Code: [Select]

void loop( ) {
   while( ) {
   } // ends while
} // ends loop


If you Autoformat the code (Tools:Autoformat, or CTRL-T) it will notify of mismatched pairs also.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

lupiana

Another ERROR...... please HELP



leonardo.ino: In function 'void loop()':
leonardo.ino:17:3: error: expected '}' at end of input
Errore durante la compilazione


Look Attachment

Gippopotam

Line 4 - remove ")"
line 17 - place "}"

why GIF?

lupiana


PaulMurrayCbr

leonardo.ino: 6: 2: error: expected unqualified-id before '{' token

How to fix this error?
remove ";" in the end of line 2
remove line 4
Better still, do a free online tutorial on the C++ programming language, and understand what all those punctuation marks actually mean.
http://paulmurraycbr.github.io/ArduinoTheOOWay.html

Go Up