karon
1
I get this error for my PlayeCollisions script
BCE0044: expecting EOF, found }`
"This is what I have written"
if(doorIsOpen){
doorTimer += Time.deltaTime;
}
}
if(doorTimer > 3){
Door (doorShutSound, false, "doorshut", currentDoor);
doorTimer = 0.0;
}
}
}
best regards
Sigfus
It means you have one too many '}' in your script (or in your case three).
if(doorIsOpen){ doorTimer += Time.deltaTime; }
if(doorTimer > 3){
Door (doorShutSound, false, "doorshut", currentDoor);
doorTimer = 0.0;
}
I have the same problem but my script doesnt have to many }
var ray : Ray;
var hit : RaycastHit;
function Start () {
}
function Update () {
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Debug.DrawRay(transform.position, -up * 45, Color.magentas);
if (Input.GetButton("Left")) {
transform.position.x = transform.position.x - 0.5;
}
if (Input.GetButton("Right")) {
transform.position.x = transform.position.x + 0.5;
}
if (Input.GetButton("Down")) {
transform.position.z = transform.position.z - 0.5;
}
if (Input.GetButton("Up")) {
transform.position.z = transform.position.z + 0.5;
}
if(Physics.Raycast(ray, hit){
Debug.Log("Hit") ;
}
}