Problem with forcing objects to a 2D plane

I’ve typed a script that forces an object to a 2D plane; actually revised the Force2D script. Unity errors are
Assets/Force2D.js(1,33): UCE0001: ‘;’ expected. Insert a semicolon at the end.
Assets/Force2D.js(1,40): UCE0001: ‘;’ expected. Insert a semicolon at the end.

public var forceBetweenXYZ:First Person Contoller="z";
private var Axis:Vector3;//desired depth ;
private var Rotation:Vector3;//desired rotation ;


function Awake(){
	Axis=transform.position;//defines the starting z position as the desired Z positoin
		Rotation=transform.eulerAngles;//defines the starting rotation as the desired rotation
		
}		
function Update(){//each frame
	
	var spinforce:Vector3=gameObject.ridgidbody.angularVelocity;//is the rotational force on this frame
	
		var place:Vector3=gameObject.transform.position;//is the target position in world space on this frame
		

	if(forceBetweenXYZ=="x"){
		
		if(place.x!=Axis.x){//if the current x position is not the desired x position then...
			
			transform.position.x=Axis.x;//go to the desired x position
	
}

		gameObject.rigidbody.angularVelocity.y=0;//stop rotating around y axis
		
		gameObject.rigidbody.angularVelocity.z=0;//stop rotating around z axis
		
		gameObject.transform.rotation.y=Rotation.y;//resets it to the desired y rotation
		
		gameObject.transform.rotation.z=Rotation.z;//resets it to the desired y rotation
		
		}else if(forceBetweenXYZ=="y"){
				  if(place.y!=Axis.y){//if the current x position is not the desired x position then...
				  
						   transform.position.y=Axis.y;//go to the desired x position
						   
		  }
		  gameObject.rigidbody.angularVelocity.y=0;//stop rotating around y axis
		  
		  gameObject.rigidbody.angularVelocity.x=0;//stop rotating around z axis
		  
		  gameObject.transform.rotation.x=Rotation.x;//resets it to the desired y rotation
		  
		  gameObject.transform.rotation.z=Rotation.z;//resets it to the desired y rotation
		  
}else{

		  if(place.z!=Axis.z){//if the current x position is not the desired x position then...
		  	
		  			  transform.position.z=Axis.z;//go to the desired x position
		  			  		  
	 	 }
	  
		 gameObject.rigidbody.angularVelocity.y=0;//stop rotating around y axis
		 
		 gameObject.rigidbody.angularVelocity.x=0;//stop rotating around z axis
		 
		 gameObject.transform.rotation.y=Rotation.y;//resets it to the desired y rotation
		 
		 gameObject.transform.rotation.x=Rotation.x;//resets it to the desired y rotation
		 
		 if(forceBetweenXYZ!="z")
		 
		 		 print("FORCING Z BY DEFAULT,USE X,Y, OR Z LOWERCASE");
		 		 
		}
		
	}

Thanks guys! :slight_smile: