NavigationStatus Problem

Hello, Im quite desperate about this little script I wrote.
I have tried everything which i could think of. Actually, this is my first thread after 1,5 year :smiley:
Anyway, I think its just an syntax error. Please help :slight_smile: Lukas

(Error message:

Operator ‘==’ cannot be used with a
left hand side of type
‘UnityEngine.NavMeshPathStatus’ and a
right hand side of type

private var player : Transform;
private var nav : NavMeshAgent;

function Awake ()
player = GameObject.FindGameObjectWithTag ("Player").transform;
nav = GetComponent (NavMeshAgent);
nav.SetDestination (player.position);

function Update (){



Never tried this. I was just comparing to what I saw on this page.