This question was
closed Oct 21, 2016 at 01:09 PM by
Landern for the following reason:
The question is answered, OP corrected mistake.
UCE001 Insert a semicolon at the end
Hello I have this error appearing (UCE001: ';' expected. Insert a semicolon at the end) on Unity with my script and I don't know how to fix it. Thanks for your help:
pragma strict
var coins : int = 0;
function Start () {
}
function Update () {
function (OnGUI){ GUI.Label(new Rect(10,5,300,50), "Score:"+ coins);
} }
function Update () {
}
Comment
Answer by Landern · Oct 21, 2016 at 12:43 PM
You have duplicate Update functions. You have a function called OnGUI that is wrapped in parenthesis, you have wrapped the OnGUI function in the Update function, etc.
Fixed:
var coins : int = 0;
function Start () {
}
function Update () {
}
function OnGUI () {
GUI.Label(new Rect(10,5,300,50), "Score:"+ coins);
}
Yeah I just fixed the problem some $$anonymous$$utes ago, thanks a lot for your answer I will be more careful next time ! :)