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);
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 minutes ago, thanks a lot for your answer I will be more careful next time ! :)
Yeah I just fixed the problem some minutes ago, thanks a lot for your answer I will be more careful next time ! :)
– LightF13