Help with Crait's random number guessing game [SOLVED]

Hi folks.

i’m pulling my hair out trying to compile the code in Crait’s lesson 4, random guessing game.

It keeps telling me it expects a “}” before my else statement but i’ve gone through the whole code and the brackets are correct. This is the else that goes with the second if statement in the image below.

Even though I think i’m correct, I put in in anyway and I get the next error:

which I know is because I put the “}” in where it told me to, but this closed out my first IF statement and it means my later “}” closes out my void loop () before my last else statement.

So what the HECK is going on?!? I can’t seem to do anything that lets it compile without errors and i’ve checked it over and over and the code looks the same as the structure in the tutrorial.

HELP! :unamused:

sorry folks! I saw the problem 5 seconds after posts. I had a “;” at the end of my IF statement. D’Oh! :crazy_face:


Don’t worry, i solve a ton of problems by writing them out and then going “oh wait duh”


Protip: buy a rubber duck. :P


I talk to my cat, he and I have solved MANY problems together