It's saying "...ller.cs(12,76): error CS1009: Unrecognized escape sequence `\" ... ?

" Assets/Scripts/PlayerControlller.cs(12,76): error CS1009: Unrecognized escape sequence `\ " is the error it hits me with. It didn’t used to, This error is new for today.

There is nothing I see wrong with the code, so it seems. But it appears that I’m wrong. That’s why I’m here. I’m hoping someone more knowledgeable on this forum can see .

Here is the code.

I downloaded it and tried to run the way you guys would and got a different error:

There are inconsistent line endings in the ‘Assets/Scripts/PlayerControlller.cs’ script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

I have no idea what that means. Perhaps someone here does

Just by-the-way: the easiest way to share code on the forum is to use the “Insert Code” button, and then paste your code in the pop-editor that appears.

This error does not really make any sense (The first error that you were talking about), but maybe there is some weird, invalid white-space character in your code file. There is some menu option in Visual Studio that lets you visualize white space.

As for your next post, the inconsistent line ending message is not usually a problem, but there should also be a menu option in VS to “fix line endings” somewhere. It’s been a while since I’ve used VS.

Edit: to elaborate further- this is one of the dangers of copy-pasting code. Sometimes the source will contain weird formatting characters that you can’t really see, but the compiler does not recognize. Things like non-breaking space instead of a regular space, or special UTF-8 double quotes instead of regular double quotes.

// Sorry, I'll change my ways.

And I found the link you were talking about here.

Clearing how my code looks didn’t really catch errors. It says I’m missing assemble reference. I think that’s my problem. Does that help you hep me?

Your first screenshot shows that you haven’t saved yet in Visual Studio (the filename has a * after it). This would make sense since what you are showing in the Editor has an extra \ character, so the error is correct.

That’s a separate issue. In your screenshot the rest of the error message is cut-off, but is it complaining about “rigidbody” by any chance? There used to be a member in Monobehaviour called “rigidbody” but it was removed at some point. Now you have to get a reference to the rigidbody component using GetComponent.