How do I modify variables and call functions on a character controller?

Hi. I have a problem with accessing the health on an enemy with a character controller. I have an enemy with a simple follow script and a character controller to ensure he doesn't walk through walls. However, this character controller seems to be interfering with my health script. Here's how it works: I shoot a bullet at the enemy, and the bullet tells the enemy to call the `ApplyDamage` function. Here's the script for my bullet:

var explosion : Transform;

function OnCollisionEnter(collision : Collision) {
    if (collision.gameObject.CompareTag("Level") || collision.gameObject.CompareTag("Enemy")
        || collision.gameObject.CompareTag("Player")) 
        collider.BroadcastMessage("ApplyDamage", 5);
        Instantiate(explosion, transform.position, transform.rotation);
        Destroy (gameObject);

Pretty straightforward, right? The reason I have all those `if` statements there is because my bullet was exploding on contact with its previous explosion, and wasn't talking to the enemy. Here's the `ApplyDamage` function on my enemy:

var hitPoints = 25;

function ApplyDamage(damage : float) {
    hitPoints -= damage;
    Debug.Log ("I'm Hit");

    if (hitPoints <= 0) {
        Destroy (gameObject);

Also, pretty straightforward. However, when I run the game and shoot the enemy, this error gets called:

BroadcastMessage ApplyDamage has no receiver!

I can't figure out why this is happening, and why the function isn't getting called. Contact is made, however, as my bullet does explode when it hits the enemy. I've tried `SendMessage` and `SendMessageUpwards`, and they don't work either. An explanation of what I'm doing wrong would be helpful, and, if possible or applicable, a list of the errors in my code. I've spend nearly two days on this, and, having to turn to other aspects of my game, must leave it to the professionals.

   collider.BroadcastMessage("ApplyDamage", 5);

In that code you are trying to call Broadcast on the bullet itself, because collider refers to the collider of the gameObject the script is attached to, which is obviously not the enemy. Instead try:

   collision.gameObject.BroadcastMessage("ApplyDamage", 5);

That will actually call it on the gameObject of the enemy (or whatever you hit) rather than the bullet.