How to solve "CS8025 Parsing error"?

Hello, I’m on the Number Wizard section. I have looked at other parsing errors fixes but they aren’t working.

I have copied the lecture exactly as far as I can tell. It should be telling me I pressed the arrow keys down, but it won’t even run the game.
When I push run, it says “All complier errors must be fixed before you can enter playmode!”

Here is my code:

Here is how my Unity looks:

Things I’ve tried:

  • Recreating the file entirely, recoding it all. Tried this twice.
  • Removed lower half of code to see what was wrong, still didn’t run.
  • Looked at other parsing errors, added “{}” as needed. Still won’t run.

Please help, not sure where to go from here.

Unity 4.6.5f1
MonoDevelop

Assuming all of your code is in that screenshot, you are missing a closing } character to close the class.

You can paste your code in your posts btw, rather than screenshots.

1 Like

Ahh that’s what I missed. Thank you.

It’ll run now, but it says "The referenced script on this Behavior is missing!"
Would you know why? It runs fine now it just has that warning.

Click on your Number Wizard game object in the Hierarchy, then click on the Inspector view, the Script component may mention the referenced script is missing.

If so, drag your NumberWizards.cs script file from the Project View into this field.

This can often occur if you rename a script.

1 Like

Privacy & Terms