Assets\Scripts\PlayerController.cs(36,70): error CS1003: Syntax error, ',' expected

I’m making a 2d Platformer game, and I finished writing my script when this error, Assets\Scripts\PlayerController.cs(36,70): error CS1003: Syntax error, ‘,’ expected popped up. This is my script

Can you spot anything odd syntactically in line 36?

Sorry for being ominous but it‘s obvious if you take a close look. :wink:

1 Like

First, you are using Visual Studio wrong. It seems you went into the folder using Explorer and opened the .cs file directly. Instead, you should open the script from within Unity’s Project tab: this will load the actual Visual Studio solution, which contains the necessary information for Visual Studio to do auto-complete functions, types, fields, properties, etc, and show syntax errors directly in its code editor.

Second, the “(36,70)” in the error message means “line 36, character 70”. If you go to that line, you’ll see exactly what the problem is. If you had Visual Studio properly setup with a project instead of editing a single file, it would show you as you typed that AddForce() method takes two parameters, and that parameters must be separated by a comma.