BCE0044: expecting error

got a few errors and I’m confused on how to fix them, any help will be much appreciated.

function playerstatecontoller() 
{
	If ((Input.GetAxis("Vertical") !=0 || Input.GetAxis("horizontal") !=0))
	{
		If (Input.Getbutton("Sprint"))
		{
		playerstate == 2;
		}
//Line below it says that it was expecting }, found 'else'
		else
		{
//Line below expecting :, found ';'
		playerstate == 1;
		}
	else
	{
	playerstate == 0;
	}
}
}

1 “=” not 2

x = y;

x is set to the value of y
its value changes.

x == y

x is compared against y
the value of x doesnt change