So I have an unexpected token of a ; at the end of a var, so I removed it, than it said it was an expected token… I am completely new to all this, and all the scripting i’ve been doing has been following a tutorial, so if it was all completely wrong I wouldn’t know. Can someone please tell me how to fix this, as I only just found out what an unexpected token was, let alone how to do all this. What have i done wrong? Thanks everyone. Plus any beginners tips would be nice!
var forwardSpeed : float = 3;
var turnspeed : float = 2;
Function; Update ();
- {
//this is the forward speed that will happen in the game
};var; forwardMoveAmount: Input.GetAxis("Vertical")*forwardSpeed;
var turnAmount = Input.GetAxis("Horizontal")*turnSpeed;
transform.Rotate(0,turnAmount,0);
}