how do u add sound clips to an animation using animation events?

ok so when i go into animation view > i go to add animation event > it adds it > i click it and it asks for a function > what next? > i have some code >

var shotgunsound : audioClip;

if(shootanimation)
{
Sound.Play(shotgunsound)
}

why does it also tell me there are no functions even if i inport a bunch of scripts?

animation events run functions. create a function like this:

function PlaySound()
{
   audio.Play();
}

and then put that function in the animation event.