I get the message "Assets/Scripts/GunFire.js(22,10): UCE0001: ';' expected. Insert a semicolon at the end." When i am not missing a semicolon, Please Help!
Heres My Code:
var MuzzelFlashGo : GameObject;
function Update () {
if(Input.GetButtonDown("Fire1")) {
var gunsound : AudioSource = GetComponent.();
gunsound.Play();
Flash.SetActive(true);
MuzzelFlashStop();
GetComponent.().Play("GunShot");
GlobalAmmo.LoadedAmmo -= 1;
}
if (Input.GetButtonDown("Fire1")) {
if (GlobalAmmo.LoadedAmmo < 0) {
GlobalAmmo.LoadedAmmo += 1;
}
}
}
function MuzzelFlashStop() {
yeild WaitForSeconds (0.1);
Flash.SetActive(false);
}
Its the line 'yeild WaitForSeconds (0.1);' line on the 10th character
↧