Help me please!!!! ;(

I get these errors when im trying to make my sprint,walk,idle Script D:
Assets/Scripts/Player.js(36,18): BCE0044: expecting ), found ‘=’.
Assets/Scripts/Player.js(36,20): BCE0043: Unexpected token: 0.
Assets/Scripts/Player.js(39,5): BCE0044: expecting :, found ‘}’.

Here is the full script

var PlayerState : float;
var PlayerAnimSec : GameObject;

function Update ()
{
PlayerStateController();
PlayerAnims();
}

function PlayerStateController()
{
if ((Input.GetAxis(“Vertical”) !=0 || Input.GetAxis(“Horizontal”) !=0))

{
if (Input.GetButton(“Sprint”))
{
PlayerState = 2;
}
else
{
PlayerState = 1;
}
}

else
{
PlayerState = 0;
}
}

function PlayerAnims()
{

if (PlayerState = 0)
{
PlayerAnimSec.animation.CrossFade(“IdleAnimation”, 0.4)
}

if (PlayerState = 1)
{
PlayerAnimSec.animation.CrossFade(“WalkAnimation”, 0.4)
}

if (PlayerState = 2)
{
PlayerAnimSec.animation.CrossFade(“SprintAnimation”, 0.4)

}
}

Help me pleaze!

Please use the code tags when posting code, it’s a pain to read code like that.
You script is full of syntax errors :

#pragma strict

var PlayerState : float;
var PlayerAnimSec : GameObject;

function Update ()
{
PlayerStateController();
PlayerAnims();
}


function PlayerStateController()
{
if ((Input.GetAxis("Vertical") !=0 || Input.GetAxis("Horizontal") !=0))

{
if (Input.GetButton("Sprint"))
{
PlayerState = 2;
}
else
{
PlayerState = 1;
}
}

else
{
PlayerState = 0;
}
}


function PlayerAnims()
{

if (PlayerState == 0)
{
PlayerAnimSec.animation.CrossFade("IdleAnimation", 0.4);
}

if (PlayerState == 1)
{
PlayerAnimSec.animation.CrossFade("WalkAnimation", 0.4);
}

if (PlayerState == 2)
{
PlayerAnimSec.animation.CrossFade("SprintAnimation ", 0.4);

}
}

= should be ==
and you forgot some ‘;’

Hi

there is an error in you script : if (PlayerState = 0) should be if (PlayerState == 0)
the same for the other if …

“=” mean assign
“==” mean comparaison

too late …