Simple car-enter script

Again, i need help… i made myself a new script to enter and descend a car (in Unity 5), but it doesnt work… any idea where the problem is? It says that some semicolons are missing, but theyre all there…
Its hard… Any example or aid with that script would be REALLY welcome… here´s the script:

var Cardrive = script;    //Driving script for the car
var Cardrive = Boolean;
function Start () { 
    Cardrive = false;
}

function Update () {
    function onTriggerEnter() {  //i have a trigger next to the car´s left front door
        animation.play() ("Enter");  //Player "enters" the car and takes place in the driver seat
        Cardrive = true;    //enables the car controlling script
    }
    if Input.GetKeyDown() ("e")      //descend the car if you press "e"
        animation.play() ("Exit") ;  //player exits the car
    Cardrive = false;   //unables the car-Script
    

}

any idea where the problem is?

Where to begin?

 var Cardrive = script;    //Driving script for the car
 var Cardrive = Boolean;

^ You have two variables of the same name. You’re assigning them to values that doesn’t exist. You’re not defining the type of Cardrive correctly.

function Update () {
     function onTriggerEnter() {

^ You’re nesting functions. onTriggerEnter should be OnTriggerEnter.

animation.play() ("Enter");

^ animation in Unity 5 is now a Component and not an Animation. You’ve mistyped Play as play. You’re trying to pass an argument to a void type.

if Input.GetKeyDown() ("e")

^ You’ve forgotton to use parenthesis for the if-statement. You’re trying to pass an argument to a boolean type.

animation.play() ("Exit") ;

^ Same deal as with the other animation.play issue.

 if Input.GetKeyDown() ("e")
     animation.play() ("Exit") ;
 Cardrive = false;

^ Apart from the two first lines which are syntax errors I already discussed, it looks like you got a logic error. Cardrive will always be false since you haven’t used a statment block.

Apart from that, some comments make no sense. (What is “descending a car”?)

var Cardrive : boolean;

// doorKey is used to exit the vehicle.
var doorKey = "e";

private var anim : Animation;

function Start () {
    Cardrive = false;
    anim = GetComponent.<Animation>();
}
  
function Update () {
    if (Input.GetKeyDown(doorKey))
    {
        // Player exits the car, playing an animation
        // and disabling the car controller.
        anim.Play("Exit");
        Cardrive = false;
    }
}
 
// I have a trigger next to the car´s left front door
function OnTriggerEnter() { 
    // Player enters the car and takes place in the 
    // driver seat. Car controller is enabled.
    anim.Play("Enter"); 
    Cardrive = true;    
}