Cumulative project three

So what am i doing wrong here i keep getting a else without if error? any help would be appreciated. Thanks!

boolean isCorrect(){
if(playerAnswer == correctAnswer){
return true;
}else{
return false;}}

What’s the rest of the code look like?

The only possible error coming from this code alone is if playerAnswer or correctAnswer have an issue.

Sometimes when errors pop out in clean code like this it might mean that the error happens immediately before these lines. (like an open bracket or something like that)

it was an open bracket. ughh the devils in the details… just posted another question if you have time and thanks for the help as always!

1 Like

It’s ok, after a while one gets used to the patterns…