Newbie question! Error with {} brackets


Sorry probably a real stupid question, but I keep getting the error on the right (I’m trying to code the sleep debt calculator). Which { is causing the problem? Is there a way to tell?

Thanks so much in advance!

Try adding else before all ifs except the first.
The if by itself is only applied once. But if you want to use a lot of ifs one after another, you have to add them with else in the form of else if

if (condition1) {
} else if (condition2) {
} else {

Can’t you just copy and paste your code into the post? It feels like the error is in the part of the code that may not be visible in the picture.

Very Nice Posting , I am Kiu77 Liked this