Error BCE0034

first time making a game i got error BCE0034 in my script expressions in statements must only be executed by their side affects what did i write that isn’t doing anything? `

  1. #pragma strict
  2. var Damage : int = 50;
  3. var Distance : float;
  4. function Update()
  5. {
  6. if (Input.GetButtonDown(“fire1”));
  7. {
  8. var hit : RaycastHit;
  9. if (Physics.Raycast (transform.position,
    transform.TransformDirection(Vector3.forward),hit));
  10. {
  11. Distance = hit.distance;
  12. hit.transform.SendMessage(“ApplyDamage”); SendMessageOptions.DontRequireReceiver;
  13.  }
    
  14. }
  15. }

Please include full, accurate error messages. They tell you exactly where and what error has occurred. In your case:

hit.transform.SendMessage("ApplyDamage"); SendMessageOptions.DontRequireReceiver;

That should be a single statement, with SendMessageOptions as the second parameter to SendMessage.