insert a semicolon at the end???????????

unity is giving me an error saying (Assets/FootStepON.js(3,26): UCE0001: ‘;’ expected. Insert a semicolon at the end). here is the script:

if (Input.GetKeyUp (KeyCode.W))
audio.clip = FootStepSound1.wav;


to add an audio clip you’ll have to write code in following manner

    audio.clip = Resources.Load<AudioClip>("path") as AudioClip;


it’ll load clip in your audioSource which is named as audio. rest is upto you how you want it to play.

Try this instead of your code.