- Home /
Question by
Chickenator · Aug 16, 2014 at 03:52 PM ·
javascriptpongfoundexpecting
BCE0044: expecting '"', found '\r'.
The full error is Assets/Control.js(15,49): BCE0044: expecting '"', found '\r'. Here's my script. Any help?
#pragma strict
function Start () {
var randomnumber = Random.Range(0, 2);
if (randomnumber <= 0.5) {
rigidbody2D.AddForce (new Vector2 (80, 10));
}
else {
rigidbody2D.AddForce (new Vector2 (-80, -10));
}
}
function OnCollisionEnter2D (colInfo : Collision2D) {
if (colInfo.collider.tag == "Player) {
Debug.Log "works"
}
}
Comment
Best Answer
Answer by robertbu · Aug 16, 2014 at 03:54 PM
Line 15 and 16 should be:
if (colInfo.collider.tag == "Player") {
Debug.Log ("works");
}
Your answer
Follow this Question
Related Questions
SemiColon At The End and Found /n Errors! Help! 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Expecting :, found ; and can't figure it out... 2 Answers
Various Code errors, found X was expecting Y, missing ";", and "can't declair functions on the fly" 2 Answers
Can someone help me fix my Javascript for Flickering Light? 6 Answers