var PlayerState = float;
var PlayerAnimsec:GameObject;
function Update () {
}
function PlayerStateController(){
if(Input.GetButton(“Horizontal”)!=0||Input.GetButton(“Vertical”)!=0){
PlayerState = 1;
}
}
The error is caused by the first line:
var PlayerState = float;
This assigns the type float to PlayerState. You should use a “:” instead - like this:
var PlayerState : float;