I am new to all this, and I have begun a project for a game based around aircraft. To begin Im just starting with a basic code and for some reason whenever I begin playing it just says “error CS8025: Parsing error!”
This is the code;
}
var rotateSpeed = 25.0;
var speed = 50.0;
function Update() {
var transAmount = speed * Time.deltaTime;
var rotateAmount = rotateSpeed * Time.deltaTime;
if (Input.GetKey("up")) {
transform.Rotate(rotateAmount, 0, 0);
}
if (Input.GetKey("down")) {
transform.Rotate(-rotateAmount, 0, 0);
}
if (Input.GetKey("left")) {
transform.Rotate(0, -rotateAmount, 0);
}
if (Input.GetKey("right")) {
transform.Rotate(0, rotateAmount, 0);
}
if (Input.GetKey ("z")) {
transform.Rotate(0, 0, rotateAmount);
}
if (Input.GetKey ("x")) {
transform.Rotate(0, 0, -rotateAmount);
}
if (Input.GetKey ("a")) {
transform.Translate(0, 0, transAmount);
}
if (Input.GetKey ("q")) {
transform.Translate(0, 0, (transAmount * 2));
}
}
Any help would be greatly appreciated. Thanks!