Errors are there to help you. It’s a good idea to try and learn how to understand them. Try to apply the breakdown in this post of your original error to the new error you’re receiving. If you don’t understand a word, don’t just gloss over it. Ask what the word means here, or research it elsewhere. Cultivating a habit of research will pay dividends for you in every part of your coding journey.
Here’s a breakdown of your specific error, but try applying this process to any other error you may encounter as well:
This section of the error is the prefix, and the format is standard across all messages:
Assets\MouseLook.cs(29,62)
→ The compiler encountered an error at this file: Assets\MouseLook.cs
, at this position (line, column): (29,62)
error CS1003
→ A technical code that refers to this specific type of error. When in doubt, try googling the code in question (eg. “c# CS1003” or “unity CS1003”). It will probably lead you to a page like this ( CS1003), which will provide more context for what the error is and why it occurs. This is a great last resort when trying to figure out why an error is happening. It will also often lead you to a helpful StackOverflow post, or even right back to this forum .
The rest of the error is the error message itself:
The error message varies wildly from error to error. For many common errors you will be able to copy paste this section directly into a search engine and find many articles/forum posts/etc. on what it means and why it happens.
Syntax error
→ something is wrong with how the code is formatted.
',' expected
→ The compiler was expecting a comma at this location but didn’t find one.
All of the above boils down to this:
On line 29, you forgot a comma between xRotation
and 0f
:
transform.localRotation = Quaternion.Euler(xRotation 0f, 0f);