Where is the error?

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

Picture.GIF

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

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

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

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

If you Autoformat the code (Tools:Autoformat, or CTRL-T) it will notify of mismatched pairs also.

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

Picture_2.GIF

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

why GIF?

OK!
Thanks

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

How to fix this error?

Gippopotam:
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.