Firing a raycast through the crosshair/spawing particles

So,

I’m trying to fire a raycast through the crosshair everytime the player shoots, and after that, spawing some particles.
I saw some examples in the forum, ried do get it work on my scrip, but i get an error everytime I change something on the script.

var ammo:int = 8;
var shells:int = 3;
var damage:int = 50;




function Update () 
{
		if (Input.GetAxis ("Fire1")  ammo > 0)
		{	
			Shoot ();
		ammo--;
		}
		
}

function Shoot ()
{

				var ray = Camera.main.ScreenPointToRay (crosshairScreenPos);
				var hit : RaycastHit; 
				if (Physics.Raycast(ray, hit, 5)) 
					{
						if(hit.collider.gameObject.tag=="enemy")
							{
								print ("Got ya!");
							}
	
					}
			
}

So, can anybody help me, please?

Which errors are you getting?

"unknown identifier “crosshairScreenPos”

I probably missed something about that.
And about the sparles, I have no idea how to do it. Maybe create an empty gameobject and associate the sparkles on it?

Stupid observation here - but did you forget to set a value for “crosshairScreenPos”?

And also, don’t you need ‘out’ in Physics.Raycast (ray,out hit)?

/W