Script error: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(System.Type)' was found

var speed = 3.0;
var rotateSpeed = 3.0;
function Update ()
{
   var controller : CharacterController = GetComponent(CharacterController);
   transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
   var forward = transform.TransformDirection(Vector3);forward;
   var curSpeed = speed * Input.GetAxis ("Vertical");
   controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController) 

when i try to run this script it tells me an error: Assets/MoveAroundObjectScript.js(7,43): BCE0023: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(System.Type)' was found.

The problem is with this:

var forward = transform.TransformDirection(Vector3);forward

I think you meant to type:

var forward = transform.TransformDirection(Vector3.forward);

The script reference for TransformDirection explains the correct syntax, and gives examples.

However, if I correctly understand what you're trying to do, you can just use transform.forward, which is the blue/z/forward axis of the transform in world space.

Actually, you can use both Vector3.forward and transform.forward, as I've seen both used before. The end result, however, appears to be different from each other so they're not exactly interchangeable.