I want to make a sound play when I press a key. when I attach this to anything it says it has not finished compiling yet.
var sound1 : AudioClip;
var sound2 : AudioClip;
var sound3 : AudioClip;
function Update () {
if (Input.GetKey("1")) {
audio.Play(sound1); }
if(Input.GetKey("2")){
audio.Play(sound2);}
if(Input.GetKey("3")){
audio.Play(sound3);}
}