- Home /
BCE0044: expecting EOF, found }` error In my scripy
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
Answer by johan-skold · Feb 13, 2011 at 12:22 PM
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;
}
Thanks Johan A bit difficult to follow Will in Unity game development essentials becouseyou dont have a complete picture of the script. Although it is a great book.
Answer by AmazingB · Feb 14, 2013 at 12:49 AM
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") ;
}
}
Your answer
Follow this Question
Related Questions
EOF what does it mean? 3 Answers
Error BCE0044 plz help 0 Answers
Errors in Vector2 variables 1 Answer
Error: expecting ( 1 Answer
BCE0044: expecting '"', found '\r'. 1 Answer