complier Error unexpected char' '.

im typing a code for a sphere to move here is the script:

  var speed: player1 = 3.0 ;
 var rotateSpeed: player1 = 3.0;
 function Update () 
 {
	var controller : CharacterController= GetComponent(CharacterController);
	
	// Rotate around y - axis
	transform.Rotate(0. Input.GetAxis ("horizontal") *  rotateSpeed. 0);
	
	// Move forward / backward
	var forward = transform.TransformDirection(Vector3.forward);
	var curSpeed = speed * Input.GetAxis ("vertical");
	controller.SimpleMove(forward * curSpeed);
 }

 @script RequireComponent(CharacterController)

 var speed: player1 = 3.0 ;
 var rotateSpeed: player1 = 3.0;
 function Update () 
 {
	var controller : CharacterController= GetComponent(CharacterController);
	
	// Rotate around y - axis
	transform.Rotate(0. Input.GetAxis ("horizontal") *  rotateSpeed. 0);
	
	// Move forward / backward
	var forward = transform.TransformDirection(Vector3.forward);
	var curSpeed = speed * Input.GetAxis ("vertical");
	controller.SimpleMove(forward * curSpeed);
 }

 @script RequireComponent(CharacterController)

and it gives me this error:

Assets/move the ball.js(10,28): BCE0044: unexpected char: ’ '.

plz tell me what im doing wrong the error is on line 10

The code is being displayed rather funnily, but I’m guessing each of the numbers declares a line break? In that case the line with the error is:

transform.Rotate(0. Input.GetAxis ("horizontal") * rotateSpeed. 0);

The “0.” after the first bracket and the “. 0” before the end bracket are going to give you errors… Try this:

transform.Rotate(Input.GetAxis ("horizontal") * rotateSpeed);

Hope this helps you get past the error and get on with your project…