if statement error


I’m a game dev who is nativly an artist, but wants to learn how to freelance. Therefore I’m reletivly new to scripting. I have an if statement that is errored:

if (Input.GetAxis("W/S") = 0)


It has three errors:

1: “Assets/Scripts/PlayerController.js(30,34): BCE0044: expecting ), found ‘=’.”

2: “Assets/Scripts/PlayerController.js(30,36): BCE0043: Unexpected token: 0.”

3: “Assets/Scripts/PlayerController.js(32,16): BCE0044: expecting :, found ‘=’.”

A test for equality is “==” - a single “=” is an assignment statement - which is what your problem is, you want to test if something is equal to 0.