i have no idea how to fix this… my script is:
var range: float = 5; // define the
detection distance
private var hit: RaycastHit;
function Update(){
if (Input.GetKeyDown("e")){
var ray = Camera.main.ViewportPointToRay(Vector3(0.5,0.5,0));
if (Physics.Raycast(ray, hit, range)){
// check if the object hit has SoundScript.js:
var ss: 'SoundScript' = hit.transform.GetComponent(SoundScript);
if (ss && !audio.isPlaying){ // if so, play its sound:
audio.clip = ss.soundFX;
audio.Play();
}
}
}
}
whenever i try to go into play mode i get this…
Assets/sound file lomg.js(9,15): BCE0043: Unexpected token: soundScript.
i have been messing with it for hours but with no success, what do i do?