UCE0001: ';' expected. Insert a semicolon at the end.
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.<AudioSource>();
gunsound.Play();
Flash.SetActive(true);
MuzzelFlashStop();
GetComponent.<Animation>().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
Answer by Landern · Feb 07, 2017 at 09:51 PM
your spelling of yield is wrong on line 22 change to:
yield WaitForSeconds(0.1);
Otherwise if there is a hidden character between char 10 and 11 then just copy the above and paste it over the current line.
Wow, thank you, I didn't know I would get an answer so quick! Good on you for taking your own time to help others! $$anonymous$$eep up the helping attitude! Thank you and goodbye :-)
Your answer
Follow this Question
Related Questions
Error Using UCE0001: ';' expected. Insert a semicolon at the end. 1 Answer
How to fix (NullReferenceException: Object reference not set to an instance of an object) in my case 0 Answers
What does this error mean? 1 Answer
public UnityEngine.UI.Text fixing errors. 1 Answer
fatal error checkdisalowAllocation. Allocating memeort when it is not allowed to allocate memory 4 Answers