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;
}
}
}