error help

i am making a script but it says something can you help me?

Assets/My Stuff/scripts/TurretControl.js(48,52): BCE0044: expecting :, found ‘=’.

function CanAttackTarget()
{
	if(Vector3.Distance(transform.position, target.position) > range)
	{
		
		return  false;
	}
	return true;
}

InvokeRepeating("barrelAnimate", 0, 0.05);

function barrelAnimate()
{
	if(LeftFlame && RightFlame)
	{
		if(LeftFlame.renderer.enabled)
		{
			LeftFlame.renderer.enabled = false;
			RightFlame.renderer.enabled = true;
		}
		else;
		{
			LeftFlame.renderer.enabled = true;
			RightFlame.renderer.enabled = false;
		}
	}
	else;
	{
		print("Effects on turret not set")
	}
}

You must remove the “;” after “else”

Pro tip: The numbers in the brackets in the error tell you the line number and column number where the compiler encountered the error. Double-clicking the error message should take you to the exact line with the problem. Then it’s just a case of figuring out what the compiler is telling you.