Hi,
I am working through the Knights 3D game from design 3. No one there looks at their emails anymore so I thought I would try here.
In video 15, it has me write an AccuracyGUI script:
#pragma strict
var guiSkin : GUISkin;
private var display : boolean = false;
function OnGUI(){
GUI.skin = guiSkin;
if (display){
GUI.Label(Rect(Screen.width/2 -12,Screen.height/2 -80, 100,100), “Accuracy”);
GUI.Label(Rect(Screen.width/2 -50,Screen.height/2 -80, 100,100), Mathf.Round(GameController.accuracy),ToString()+“%”);
}
}
function ToggleDisplay(){
display = !display;
}
I get this error: Assets/My Scripts/AccuracyGUI.js(15,26): BCE0023: No appropriate version of ‘UnityEngine.GUI.Label’ for the argument list ‘(UnityEngine.Rect, float, String)’ was found.
If I comment out the second line, I can see the word Accuracy flash on the screen. So it all works except the second line to get the accuracy percentage.
Any help is much appreciated