- Home /
Error Message Coordinates
I have been struggling over several error messages for days, and I was wondering if the "coordinates" of the error message mean anything. I am new, so if I am saying something stupid, don't get mad. The "coordinates" I was talking about, although I doubt that is what they are, are Assets/test-unity-5.js(18,38): BCE0043: Unexpected token: ). The 18 and 38 are what I am talking about.
``
#pragma strict
private var JumpH = 8;
// Jump Hieght 8 units
private var IsFalling = false;
// Is not falling start
var particle : GameObject;
function Update ()
{
for (var touch : Touch in Input.touches) {
if (touch.phase == TouchPhase.Began) {
var ray = Camera.main.ScreenPointToRay (touch.position);
if (Physics.Raycast (ray)) {
//ad effects here
GetComponent<Rigidbody>().velocity.y = JumpH;
IsFalling = true;
}
}
}
}
Line 18 is GetComponent().velocity.y = JumpH; I don't have a line 38.
I also recieved two more errors with different #s.
Assets/test-unity-5.js(18,39): BCE0044: expecting ), found '.'.
Assets/test-unity-5.js(18,40): UCE0001: ';' expected. Insert a semicolon at the end.
Would someone please explain what these numbers are and how the errors are occurring? Thank you in advance.
Answer by BiG · Jul 09, 2015 at 01:56 PM
You are mixing UnityScript and C# here. In fact, line 18 has a C# synthax.
You should do
rigidbody.velocity.y = JumpH;
and then, your other errors should go away.
Wow, thanks! I used what I thought was the updated API.