[Serialize Field] and moveSpeed Issue in Obstacle Course Game

Hello!

I have typed in exactly what I see on the course screen, but after I save and return to Unity, I receive the following compiler error:

Assets\Scripts\Mover_script.cs(9,5): error CS1519: Invalid token ‘;’ in class, struct, or interface member declaration

I’ve looked through a number of Resolved Q&A posts about this, but none answer this issue.

Thank you for any assistance.

Hi Roger,

Double click on the error message. To which line in your code does it refer? Then check that line in your script editor.

Please let me know if you were able to spot and fix the problem. :slight_smile:


See also:

Thank you so much! I didn’t know about double-clicking on the error message. It immediately showed me what I did wrong.

I did, in fact do a typo. I am attaching the error so others can see, and hopefully fix such an error of their own.

You’re welcome. :slight_smile:

The error messages often sound cryptic but since we tend to do the same mistakes over and over again, we’ll eventually become familiar with a few of those messages. “Invalid token” is one of those common mistakes.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms