- Home /
Question by
Dusseldorf · Jun 22, 2012 at 10:20 AM ·
tokenunexpected token
unexpected token
function Start () {
var speed = 6;
var walkSpeed = 8;
var jumpSpeed = 8.0;
var gravity = 20.0;
var Character : Transform;
print(speed);
print(walkSpeed);
print(jumpSpeed);
print(gravity);
print(Character);
}
private var moveDirection = Vector3.zero;
private var grounded : boolean = false;
private var walking : boolean = false;
private var startup : boolean = true;
private var running : boolean = true;
print(moveDirection);
print(grounded);
print(walking);
print(startup);
print(running);
{
when i save it, it says in unity: "unexpected token: ." The unexpected token should be in line 35but i only have 34 lines??
Comment
Answer by FLASHDENMARK · Jun 22, 2012 at 10:32 AM
function Start () {
var speed = 6;
var walkSpeed = 8;
var jumpSpeed = 8.0;
var gravity = 20.0;
var Character : Transform;
print(speed);
print(walkSpeed);
print(jumpSpeed);
print(gravity);
print(Character);
}
private var moveDirection = Vector3.zero;
private var grounded : boolean = false;
private var walking : boolean = false;
private var startup : boolean = true;
private var running : boolean = true;
print(moveDirection);
print(grounded);
print(walking);
print(startup);
print(running);
You added one too many open braces at the end.