Yeah, like said above this is the error:
BCE0044: expecting (, found ‘Chop’.
this is my script:
#pragma strict
var rayLength : int = 10;
var treeScript : TreeController;
var playerAnim : PlayerControl;
function Update()
{
var hit : RaycastHit;
var fwd = transform.TransformDirection(Vector3.forward);
if(Physics.Raycast(transform.position, fwd, hit, rayLength))
{
if(hit.collider.gameObject.tag == "Tree")
{
treeScript = GameObject.Find(hit.collider.gameObject.name).GetComponent(TreeController);
playerAnim = GameObject.Find("Arms05").GetComponent(PlayerControl);
if(Input.GetButtonDown("Fire1"))
{
StopCoroutine("Chop");
StartCoroutine("Chop");
}
}
function Chop ();
{
yield WaitForSeconds(2);
treeScript.treeHealth -= 1;
}
}
}
It’s probably sometime quite simple, but please tell me what I am doing wrong, or if there are any other errors in the script. Thanks!