All Compilers have to be fixed before you can enter playmode.

When I use this script playmode doesn’t work. I looked in the Console and there were 4 errors. I fixed 3. The last one was something like: “unexpected if” Then I tried some things and now I have 2 different Errors (Script and errors are here as images). The Script should make the player able to move.

Input.GetAxis is underlined in red. That’s where the error is and this is the first google result for Input.GetAxis, with an example on how to use it.

Remove the ‘=’ between Input.GetAxis and its parameters ("Horizontal")

  1. Thanks for the help with the first error.
  2. I found out how to fix the other error. You have to use “gameObject.GetComponent().velocity.y);” instead of “gameObject.GetComponent.velocity.y);”.
  3. I extended the code that the player rotates if he is walking in the other direction but I have 2 errors again (You can see them in the screenshot).