Error from variable declaration in trigger script

I am trying to write a script that when the player colides with a hitbox attached to a gate object it sets the gates tag to "ActiveComponent". Then a secondary script allows the "e" key to toggle the gate open/close. I have the script that actually moves the gate between open and closed. My problem is the first script:

var Target : GameObject;
var TagTarget : GameObject;

function OnTriggerEnter (Target : Collider) {
    Invoke ("TargetTag", 2);
}

function TargetTag() {
    TagTarget.tag = "ActiveComponent";
}

The variable Target will be the player that activates the trigger. And TagTarget is the object who's tag is going to be changed.

I'm not the most experienced scripter so don't burn me to bad :-)

Thanks in advance, Cam

Naruse answered your question, though he did it in the comments (bad naruse `:)` ), so I'll answer it officially here.

Your two variable names are conflicting with each other.

var Target : GameObject;

function OnTriggerEnter (Target : Collider) {
    // ...
}

You have a "Target" declared globally, and another "Target" declared as the parameter to your function. You need to rename either of these in order for this script to work.