Error BCE0005 in Javascript

Hi all, just had a new problem with my code. I have Modified CharacterMotor.js (FPS Controller) to make my characters run, but i get these errors:

Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js(342,46): BCE0005: Unknown identifier: 'currentSprintTime'.


Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js(342,71): BCE0005: Unknown identifier: 'SprintCooldownOn'.

Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js(371,43): BCE0005: Unknown identifier: 'maxSprintTime'.

This is the code:

// The maximum horizontal speed when moving

	var maxForwardSpeed : float = 10.0;
	var maxSidewaysSpeed : float = 9.0;
	var maxBackwardsSpeed : float = 9.5;
	
	// [CUSTOM] Sprint duration
	var maxSprintTime : float = 20.0; // Time in seconds that player can sprint
	var currentSprintTime : float = 20.0; // Initial Sprint Time
	var SprintCooldownOn : boolean = false; // Sprint Cooldown Var
	var SprintOn : boolean = false; // Tells if Player is Sprinting
	
function Update () {
    
    	if ( Input.GetKey( "left shift" ) && currentSprintTime > 0 && SprintCooldownOn == false ) // CUSTOM SPRINT SCRIPT
    	{
    		movement.maxForwardSpeed = 15.0;
    		movement.maxSidewaysSpeed = 14.0;
    		movement.maxBackwardsSpeed = 14.5;
    		
    		SprintOn = true; // Sets Sprinting Mode ON
    		
    	}
    	else
    	{
    		SprintOn = false;
    	}
    	
    	
    	
    	
    	
    	if ( SprintOn == true && currentSprintTime > 0 )
    	{
    		currentSprintTime--; // Takes Time
    	}
    
    	if ( SprintOn == true && currentSprintTime == 0 )
    	{
    		SprintCooldownOn = true; // Sets Cooldown Mode ON
    		
    		currentSprintTime++; // Adds Time
    		
    		if ( currentSprintTime == maxSprintTime )
    		{
    			SprintCooldownOn = false;
    		}
    	}
    	
    	
    	
    	
    	
    
    	if (!useFixedUpdate)
    		UpdateFunction();
    }

Instead try making it a separate script and calling the character motor like this:

private var chMotor: CharacterMotor;
private var ch: CharacterController;

    function Start(){
        chMotor = GetComponent(CharacterMotor);
        ch = GetComponent(CharacterController);
    }

and then you could adjust speed by

 chMotor.movement.maxForwardSpeed = sprintspeed;