OnTrigger Box Collider Doesn't Work?

Hello,
I am making a capture the flag type game and i set the box collider of my flag to istrigger. This is my OnTriggerEnter script:
var player;

function OnTriggerEnter (theTrigger : Collider){
	if (theTrigger == player){
		SpasShoot.spasClipSize = 30;
		player.getComponent (flagCarrier).hasFlag = true;
	}
}

However my player runs straight through the flag and nothing that was supposed to happen happened.
Does anyone know how I can fix this problem?
Thanks a lot for the help!

I guess that this would be the right code :

if (theTrigger.gameObject.tag == "player"){  //or "Player"?
       SpasShoot.spasClipSize = 30;
       theTrigger.gameObject.GetComponent(flagCarrier).hasFlag = true;
    }

I hope this helps!

Vatsal