OnTriggerEnter gives me error?

I have this script. It gives me error before running. First script, then 1 error/1 warning.

function OnTriggerEnter (obj : Collider)
{
	if (obj.tag=="good")
	{
		Debug.Log("this is a friend of mine! – your energy has increased");
	}
	if (obj.tag=="good2")
	{
		Debug.Log("this is a friend of mine! – your energy has increased");
	}
	if (obj.tag=="bad")
	{
		Debug.Log("this is an enemy – you lost points");
	}
	if (obj.tag=="bad2")
	{
		Debug.Log("this is an enemy – you lost points");
	}
}

ERROR
Script error: OnTriggerEnter
This message parameter has to be of type: Collider
The message will be ignored.

WARNING
Script ‘Collider’ has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

It looks like the name of the script you’re using is “Collider.js”, yes? You’re going to need to change the name of the script.

What’s going on is that because your script is called “Collider”, it overrides the Collider type used in OnTriggerEnter. The function thinks that you’re using your script as an argument, rather than a standard Unity Collider.

According to the warning you have named your script ‘Collider’ which sometimes has a big effect on the functionality of some of the built in Unity functions. I would advise changing the name of that script and see if that fixes the problems.