??~~> noob question <~~??

Maybe you’ll laugh at this but I can’t figure this out.
I have Player object and Enemy object in my scene.
I have Rigidbody, Character Controller, Character Motor, Smooth Look At and my own move.js on Enemy object
Smooth Look At looks at Player.

move.js is this:

private var motor : CharacterMotor;
function Awake () {
	motor = GetComponent(CharacterMotor);
}
@script RequireComponent (CharacterMotor)
@script AddComponentMenu ("Character/FPS Input Controller")

function Update () {
	var directionVector = transform.TransformDirection(Vector3.forward);
	motor.inputMoveDirection = directionVector;
}

This makes my Enemy object go towards my Player object.
I want that my Enemy object goes towards my Player object only if the distance between them is more than 70, so I made this script:

private var motor : CharacterMotor;
function Awake () {
	motor = GetComponent(CharacterMotor);
}
@script RequireComponent (CharacterMotor)
@script AddComponentMenu ("Character/FPS Input Controller")

var Player:Transform;
var distance:float= 70;

function Update () {
	if ( Vector3.Distance(Player.position, transform.position ) >distance ) {
		function Update () {
		var directionVector = transform.TransformDirection(Vector3.forward);
		motor.inputMoveDirection = directionVector;
		}
		};
};

When I press play I get this ERROR:
Assets/Move.js(13,26): BCE0044: expecting (, found ‘Update’.

What do I have to do to fix this?
Thank you.

I got it. I don’t know how could I be so stupid…

The (13,26) is telling you where the error is. 13 lines down and 26 characters over. In the options you can turn on line numbers if you need too cause it counts empty lines as well i think lol.