C# Very Basic Character Controller Script

So my problem is I’m getting the error

Assets/Custom Scripts/controller.cs(23,26): error CS1525: Unexpected symbol `cc’

I tried replacing CC with charactercontroller which I found in the documentation but I still got the same problem. Please Help!

using UnityEngine;
using System.Collections;
[RequireComponent(typeof(CharacterController))]
public class controller : MonoBehaviour {



		public float MoveSpeed;
		CharacterController cc;
		
		
		void Start ()
		{
			cc = GetComponent<CharacterController>();
		}
		
		
		void Update () 
		{

		//moves the vector forward 1 point so original point is //vector 0,0,0 then changes to vector 0,0,1
			Vector3 foward = Input.GetAxis("Vertical")*transform.TransformDirection(Vector3.forward)*MoveSpeed
			cc.Move(forward* Time.deltaTime);
			cc.SimpleMove(Physics.gravity);
			
		}
	}

Is line 22 missing a semi colon?

Tente isto (try it) mas lembre-se de substituir os nomes das classes pela sua:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

public float speed;

private Rigidbody rb;

void Start ()
{
	rb = GetComponent<Rigidbody>();
}

void FixedUpdate ()
{
	float moveHorizontal = Input.GetAxis ("Horizontal");
	float moveVertical = Input.GetAxis ("Vertical");
	
	Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
	
	rb.AddForce (movement * 10);
}

}