- Home /
Expecting eof found }
Expecting eof found } : ';' expected. Insert a semicolon at the end. unexpected token var help please. i am pretty new to this. i am following tornadotwins tutorials.
here it is.
var speed=3.0;
var rotateSpeed=3.0;
var bulletPreFab:Transform;
function Update ()
{
var controller:CharacterController=GetComponent(CharacterController);
//Rotate around y=axis
transform.Rotate(0, Input.GetAxis ("Horizontal")*rotateSpeed,0);
//Move forward/backward
var forward=transform.TransformDirection(Vector3.forward);
var curSpeed=speed*Input.GetAxis("Vertical");
controller.SimpleMove(forward*curSpeed);
if(Input.GetButtonDown("Jump")); {
var bullet= instantiate(bulletPreFab, GameObject.Find("spawnpoint").transform.position,Quaternion.identity);
}
}
@script RequireComponent(CharacterController)
Comment
Answer by Graham-Dunnett · Mar 02, 2013 at 03:38 PM
Your line 14 has a semi-colon before the opening brace. It shouldn't have the semi-colon.
Your answer
Follow this Question
Related Questions
Var Error Help 1 Answer
Unexpected Token Error 1 Answer
Help me with this Unexpected token error 1 Answer
Unxepected token: Var (Please Help) 1 Answer
I am having a bunch of "invalid token" errors that I don't understand. Help plz -1 Answers