What is the error: 'else' without 'if' and .class expected? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

What is the error: 'else' without 'if' and .class expected?

18th Jan 2017, 12:33 AM
Simon Vicente Dubois
Simon Vicente Dubois - avatar
3 Antworten
+ 6
Your else statement was probably unrelated to your if statement due to syntax error (?)
18th Jan 2017, 2:34 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
Can you post a piece of the code? It would be helpfull.
18th Jan 2017, 2:49 AM
Kleber Leal
Kleber Leal - avatar
0
you probably put the semicolon after the brackets of the if statement. it needs {}, hope this helps
18th Jan 2017, 1:51 AM
Rastko Savic
Rastko Savic - avatar