I’m trying to make this code to work. I want it to add points onto the GUI Text as the player uses the mouse to click the object that this script is attached to. Right now its not working.
I keep getting an error saying: “HitscoreScript.js(2,25): UCE0001: ‘;’ expected. Insert a semicolon at the end.” Do I have the code setup correctly? What am I missing? What coding do I have to have on the GUI Text object?
var buck : int = 1;
var ScoreBoard : GUIText (ScoreBoard);
function OnMouseOver () {
if (Input.GetMouseButtonDown(0))
{
ScoreBoard.text = ("Score: ") + buck;
}
}
function Update () {
}