Error in script?

Can anyone find the error here I’m getting a “Assets/CharMove.cs(1,11): error CS8025: Parsing error”

Here’s the code:

var speed : float = 3.0;
var rotateSpeed : float = 3.0;

function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);

// Rotate around y - axis
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 3);

// Move forward / backward
var forward : Vector3 = transform.TransformDirection(Vector3.forward);
var curSpeed : float = speed * Input.GetAxis ("Vertical");
controller.SimpleMove(forward * curSpeed);

}

@script RequireComponent(CharacterController)

You are using Javascript inside a C# file. Put your code in a .js file or rewrite your code to C#.