The name 'Raycast' does not denote a valid type ('not found')

Ok, So i have a simple enough script for Mining in my game but for some reason this error pops up.

The name ‘Raycast’ does not denote a valid type (‘not found’) on 25,11

So here is my script and if you could please help me out with what i might have done wrong the would be great!

Error on 25,11

#pragma strict

var test : Transform;
var Character : Transform;
var maxhit : float = 1.5;
var RayCenter : Transform;
var attack : Animation; 
var idle : Animation; 
var Distance : float;

function Update () 
{
	if(Input.GetButton("Fire1"))
		{
		animation.Play("attack");
		}
		
		if(Animation.isPlaying == false);
		{
		Animation.CossFade("idle");
		}
}
function mine()
{
var hit : Raycast;
if(Physics.Raycast(RayCenter.transform.position, RayCenter.transform.TransformDirection(Vector3.forward),hit))
	{
	Distance = hit.distance;
	if(Distance <= maxhit);
		{
		hit.transform.SendMessage("Mining",Character, SendMessageOptions.DontRequireReceiver);
		}
	}
}

I forgot to put Hit after raycast… hits himself in the head