- Home /
BCE0043 unexpected token! pls help.
private var ray : Ray; private var rayCastHit : RaycastHit;
function Update() { if(Input.GetMouseButton(0)) { ray= Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray.rayCastHit)){ transform.position.x=rayCastHit.point.x; } } } by the way i got this code from youtube tutorial making a ping pong game. But i have this error at line 13 and 14. please help why is this wrong but in his tutorial this is correct.
please format your code, this is not readable. Line 13 and 14 current have no context.
private var ray : Ray;
private var rayCastHit : RaycastHit;
function Update() {
if(Input.Get$$anonymous$$ouseButton(0)) {
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray.rayCastHit)) {
transform.position.x = rayCastHit.point.x;
}
}
}
Answer by MarkFinn · Dec 22, 2012 at 04:46 PM
Stop trying to write code in Office or other word processors. Use a simple text editor or specific code editing tool.
Your answer
Follow this Question
Related Questions
BCE0043 unexpected token! pls help. 1 Answer
BCE0044 unexpected char: 0xFEFF 2 Answers
Invalid Characters in Path 1 Answer
Sending email via APK version 1 Answer