- Home /
Question by
Volice · Jul 28, 2014 at 01:56 AM ·
Assets/MELLE.js(1,15): BCE0044: unexpected char: ';'.
#pragma strict;
var TheDammage : int = 50;
var Distance : float;
function; Update; ()
{
if (Input.GetButtonDown("Fire1"))
{
Var hit: RaycastHit;
if (Physics.Raycast (Transform.positon, transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
}
}
}
This is a code I made for a melee damage action. I do not know what is wrong can someone help?
Comment
Answer by robertbu · Jul 28, 2014 at 01:58 AM
Remove the ';' from the end of the first line. A #pragma does not use a semicolon.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Ball in Pong dissapears after hitting paddle 0 Answers
How to lock the Z axis so my Enemy just flips on the Y axis 1 Answer
Why doesn't my script work? 1 Answer