I keep getting the same error: “Assets/MeleeSystem.js(3,21): UCE0001: ‘;’ expected. Insert a semicolon at the end.”
How do I fix it?
This is the script I’m using:
#pragma strict
var TheDammage : int - 50;
var Distance : float;
function Update ()
{
if (Input.GetButtonDown("Fire1"))
{
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
hit.tranform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
}
}
}