newbie trigger help!

I am simply trying to make it so when the “Player” character walks into a collider (as a trigger) of an enemy, that the enemy will select the player’s transform as its target (which I have as a variable). Then I am going to make the enemy do other things, but I cant get past this part. (this script is attached to the enemy btw)

Unity tells me I need to pass something into the Function OnTriggerEnter(Putsomethinginhere); but I dont know what to put in there?
The exact error message I get is the following but thats what I gather it wants:Assets/_Scripts/EnemyAI.js(25,23): BCE0017: The best overload for the method ‘EnemyAI.OnTriggerEnter(UnityEngine.Collider)’ is not compatible with the argument list ‘()’.

Then, down in my function it tells me I cant convert a gameObject into a Collider. OK, I get that but can you help me understand how I should format that function? I just cant wrap my head around it… Here is the code:

var target : Transform;
var moveSpeed : int;
var rotationSpeed : int;
var playerInsideEnemyCollider : boolean = false;


private var myTransform : Transform;

function Awake()
{
	myTransform = transform;
}

function Start () 
{

}

function Update () 
{
	if(playerInsideEnemyCollider == true)
	{
	OnTriggerEnter();
	}
	
}

function OnTriggerEnter(playerChar : Collider)
{
	playerChar = GameObject.FindWithTag("Player");
	var target = playerChar.transform;
	playerInsideEnemyCollider = true;
	

}

If you’ve attached this script to a trigger volume then you shouldn’t be calling OnTriggerEnter yourself, the engine will fire it for you when something enters the volume, so you don’t need the stuff you have in your update.

Next, looking at the OnTriggerEnter method itself, you’ve declared ‘playerChar’ as a Collider and then go on to reuse that variable as a GameObject type. That’s not good.

The collider information will tell you about the gameobject that it has come into contact with, so I would query that and not bother with a potentially expensive search. Does the collision relate to a player object? If so, execute your logic and if not ignore the collision.