How to correct my audioclip script?

#pragma strict

@script RequireComponent(AudioSource)
Im still trying to learn the basics of why and where charracters typed from the keyboard are supposed to be please help me out here cant seem to find a solution, thanks…im a noob

public var bong : AudioClip = bong; //make sure you assign an actual clip here in the inspector

function Start() { AudioSource.PlayClipAtPoint,(bong, Collision2D) gameobject; }

function Update ()
{

}

In the Unity editor, in your “project” tab, you should have the audio clip you want to try there.

Having selected an object with that script attached, you should drag and drop the audio file from the project tab, to the “bong” public variable that should appear in the script attached to the object.

If you want to trigger a sound playing on a specific key press, you could do something like this:

@script RequireComponent(AudioSource) 

public var bing : AudioClip; //make sure you assign an actual clip here in the inspector
public var bong : AudioClip; //make sure you assign an actual clip here in the inspector


function Update () 
{
	if (Input.GetKeyDown(KeyCode.A))//If the key 'A' is pressed
	{
		audio.PlayOneShot(bing);
		//'audio' is a shortcut to get the AudioSource attatched to this GameObject (if any)
		//'PlayOneShot()' is an easy function to play an AudioClip.
		//If you want more control over the playback, you can also do something like:
		//audio.clip = bing; ->assigns clip to the source
		//audio.pitch = 2; -> set the playback speed to double of normal
		//audio.Play(); -> play
	}
	if (Input.GetKeyDown(KeyCode.B))//If the key 'B' is pressed, play the sound 'bong'
	{
		audio.PlayOneShot(bong);
	}
}

Best, Jakob