- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
salvatore98 · Feb 07, 2014 at 07:12 AM ·
cartutorial
UNEXPECTED TOKEN )
im doing a car tutorial and trying to create a finish line and I am getting a unexpected token error
var finished:boolean;
function OnTriggerEnter()
{
Debug.Log("You Win!!");
}
function OnGUI()
( !
if(finished)
{
GUI.Label (Rect (10, 10, 100, 20), "You Win!");
}
) !
please help figure out the problem the brackets with the exclamation points are the ones which are the error
Comment
Best Answer
Answer by YoungDeveloper · Feb 07, 2014 at 07:13 AM
Your brackets aren't correct
function OnGUI(){
if(finished){
GI.Label (Rect (10, 10, 100, 20), "You Win!");
}
}
Your answer
Follow this Question
Related Questions
Simple 2D Car Game 3 Answers
Unity Car tutorial Brake 1 Answer
Carcamera script raycasting fail ? 1 Answer
Unity Car Tutorial Error 0 Answers