- Home /
Question by
sly47 · Jul 29, 2013 at 12:25 PM ·
asset path
Help me please im stuck here Assets/MeleeSystem.js(12,38): UCE0001: ';' expected. Insert a semicolon at the end.
#pragma strict
var TheDamage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5;
var IronMace : Transform;
function Update ()
{
if (Input.GetButtonDown("Fire1"))
{
IronMace.animation.Play("attack")r;
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
if (Distance < MaxDistance)
{
hit.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
}
}
}
}
Comment
Best Answer
Answer by amphoterik · Jul 29, 2013 at 12:25 PM
Your problem is right here:
IronMace.animation.Play("attack")r;
Notice the errant 'r' at the end;
what shud i do to correct it? fix it for me please thank you
Glad I could help. Please select my answer as correct (the tick mark to the left). It will help future readers and give you karma.
Your answer
![](https://koobas.hobune.stream/wayback/20220613111117im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
EnemyAi script 1 Answer
the textures look bad 1 Answer
I open my project and I found that everything's gone?! 2 Answers