Coding question on triggering an animation

I just started with Unity and I have a coding error that is on my back.

#pragma strict
var clip : AnimationClip;
function Start () 
{

}

function OnTriggerEnter (other:collider) 
{
	if(other.gameObject.tag == "trigger")
	{
		animation.Play(clip.name);	
	}
}

Basically what I’m trying to do is when the player walks into a trigger, an NPC character will execute its jump animation. I keep getting this BCE0018 error which is saying that collider does not denote a valid type. Any help is appreciated. Thank you in advance.

function OnTriggerEnter (other:collider)

should be

function OnTriggerEnter (other:Collider)

you must capitalize Collider in that context to make “other” a proper instance of the Collider class. using lowercase collider would be for referencing a collider component of some game object (like gameObject.collider)

Ok now even though I am not getting any errors, The animation is still not triggering. I have a trigger that has the correct tag and the script has the correct animation loaded into the clip.

#pragma strict
var clip : AnimationClip;
function Start () 
{

}

function OnTriggerEnter (other:Collider) 
{
	if(other.gameObject.tag == "Trigger")
	{
		animation.Play(clip.name);	
	}
	
}

Unfortunately your screenshot does not show all of the info needed to help you. Show more stuff like all of the clips assigned to the animation and show another (locked) Inspector window showing the object that is claimed to have the tag Trigger.