ERROR unity expected. insert a semicolon at the end

everytime i get this error and really dont know how to fix it i tried many things but keeps coming up the scirpt is this

#pragma strict

Var X : float;

function Start () {
//Gathering normal object scale x
X = Transform.localScale.X;
}

function Update () {
if(Input.GetKey(“a”)){ //Gamer pushes left a key
//Set texture to normal position.
transform.localScale.x = X;
}else if(input.GetKey(“d”)){ //push d
//Flip the texture
transform.localScale.x = -X;
}

}

okay i’ve fixt it i had Progma and it needed to be pragma

Looks like your issue was that you had Var instead of var, and Transform instead of transform. Also, I don’t know if Input.GetKey is a thing, so I’ve changed it to Input.GetKeyDown. Lastly, transform.localScale.x = -X; needs to be transform.localScale.x = -Math.abs(X); This gets the absolute value of the number, then converts it to a negative number.

var X : float;

function Start () { 
	//Gathering normal object scale x 
	X = transform.localScale.X; 
}

function Update () { 
	if(Input.GetKeyDown("a")){ 
		//Gamer pushes left a key 
		//Set texture to normal position. 
		transform.localScale.x = X; 
	}else if(input.GetKeyDown("d")){ 
		//push d 
		//Flip the texture 
		transform.localScale.x = -Math.abs(X);
	}
}