look at my codes
var score = 0;
var Score ;
var lookAround01 : MouseLook;
var lookAround02 : MouseLook;
var charController : CharacterController;
function OnTriggerEnter( other : Collider ) {
if (other.tag == "Coin") {
Score = score += 1;
Destroy(other.gameObject);
}
}
function Start ()
{
lookAround01 = gameObject.GetComponent(MouseLook);
lookAround02 = GameObject.Find("MainCamera").GetComponent(MouseLook);
charController = gameObject.GetComponent(CharacterController);
}
function Update ()
{
if (Score == 7)
{
lookAround01.enabled = false;
lookAround02.enabled = false;
charController.enabled = false;
}
}
function OnGUI()
{
GUILayout.Label("Score = "+Score+"/15");
if (Score == 7)
{
GUI.Button(Rect(Screen.width*0.5-50, 200-20, 100, 40), "WIN");
}
}
but it’s say i have an error on “GUILayout.Label(“Score = “+Score+”/15”);”
the error was like
help me (_ _)