can anyone help me? CS8025

using UnityEngine;
using System.Collections;

var TheDamage : int = 50;
var Distance : float;

    function Update()
{
    If(Input.GetBottonDown("Fire1"))
    {
        var hit : RaycastHit
        if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), hit))
        {
            Distance = hit.distance;
            hit.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
        }
    }
}

This is javascript code, so be sure that the file is saved with “.js” and is not a “.cs” csharp file.

 var TheDamage : 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.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
         }
     }
 }