SyntaxError: Unexpected token (37:4)

Here is the link to the project: Code.org - Game Lab

What I expect to happen: The student wants lines 38 and 39 to show up if clicks do not equal 5.
What actually happens: I can’t see what will actually happen because the code will not run with the syntax error. The code looks good to me.
What I’ve tried: I have tried deleting several lines of code to clear the error. I have checked for comma/bracket type-o’s. I have walked away from it twice to give my eyes a break. I have compared her code with my code that I did that works for a similar project.

Thank you!

Hi @jennifer.hemry,

I see that they’re checking something called ‘clicks’ in line 31. What does “clicks” mean? Where is this established in the code?

Let us know if that helps you & the student get started. If not, check back here & we can help some more.

Thanks!
–Michael K.

1 Like

Yes. You are correct. I remixed it and added in the variable for the clicks, but the same syntax error is showing up. Here is the link to the remixed with the added clicks variable: Code.org - Game Lab

I also added in the clicks = clicks + 1. Here is the updated code: Code.org - Game Lab

Okay. I got the error to go away, but now I can’t get it to go back to block mode: Code.org - Game Lab

@jennifer.hemry, On line 35, you have an extraneous semi-colon in the code. Guessing that if you remove that, you will be able to go back to block mode.

Mike

1 Like

You are my hero! Gold star for you today!!! :star_struck: :dizzy:

1 Like