I got errors on console saying
“ArgumentException: Input Button fire1 is not setup.
To change the input settings use: Edit → Project Settings → Input
melee.Update () (at Assets/melee.js:9)”
but the melee worked normal before but now giving error here are my script = melee
#pragma strict
var TheDammage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5f;
var TheMace : Transform;
function Update (){
if(Input.GetButtonDown("fire1")){
//attackAnimation
TheMace.GetComponent(Animation).Play("attack");
//attack function
AttackDammage();
}
}
function AttackDammage ()
{
//Attack function
var hit : RaycastHit;
if (Physics.Raycast (TheMace.transform.position,TheMace.transform.TransformDirection(Vector3.forward), hit))
{
if(hit.distance < MaxDistance)
{
hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver);
}
}
if (Input.GetKey (KeyCode.LeftShift))
{
TheMace.GetComponent(Animation).CrossFade("Sprint");
}
}