Compiler error with raycast

*Ok, so I am trying to use raycasting for the bullets in my FPS and I keep getting this error: Assets/Player/Player Scripts/playerShoot.js(13,25): BCE0043: Unexpected token: var.
I really hate how many questions I have to ask on here, especially when there are so many tutorials, but I don’t understand this error at all, since as far as I know it should work.
Anyways, here is my script:
//Inspector variables

function Update () {
	ShootController();
}

function ShootController()
{
	if (Input.GetMouseButton(0))
	{
		{
			var ray : Ray = camera.ScreenPointToRay(Input.mousePosition);
			var hit : RaycastHit;
			var particle : Transform;
			var muzzle : Transform;
			
			if (Physics.Raycast(ray, hit, 1000))
			{
				print(RaycastHit.collider.tag); 
			
			}		
		}		
	}
}

Thanks for your time and help!!*

You’ve got an extra set of { and } inside your if before the var - remove those.