Annoying error that does not make sense

on my screen an error that does not make any sense refuses to leave me. on one of my scripts i have everything in order and fine, yet the error says i should add a semicolon at the end. I have a semi colon at the end yet it does not go away no matter what i do?If anyone knows why or if there might be a hidden problem please help.


here's the script for the prob :/

It is the: "Health Control.HITS +=1;"

//Moving around

var speed = 3.0;
var rotateSpeed = 3.0;

//shooting

var bullitPrefab:Transform;

//dying

private var dead = false;

//getting hit

var tumbleSpeed = 800;
var decreaseTime = 0.01;
var decayTime = 0.01;

static var gotHit = false;
static var HITS = 0;
private var backup = [tumbleSpeed, decreaseTime, decayTime];   

function LateUpdate()
{
    if(dead)
    {
        transform.position = Vector3(0,4,0);
        gameObject.Find("Main Camera").transform.position = Vector3(0,4,-10);
        dead = false;
    }

    if(gotHit)
    {
        if(tumbleSpeed < 1)
        {
            //we're not hit anymore...; reset & get back in the game
            tumbleSpeed = backup[0];
            decreaseTime = backup[1];
            decayTime = backup[2];
            gotHit = false; 
        }
        else
        {
            //we're hit! Spin our charecter around  
            transform.Rotate(0,tumbleSpeed * Time.deltaTime,0, Space.World);
            tumbleSpeed = tumbleSpeed-decreaseTime;
            decreaseTime += decayTime;
        }   
    }
}        

function OnControllerColliderHit(hit : ControllerColliderHit)
{
    if(hit.gameObject.tag == "fallout")
    {
        dead = true;
        HealthControl.LIVES -= 1;
    }

    if(hit.gameObject.tag == "enemyProjectile")
    {
        gotHit = true;
        Health Control.HITS += 1;
        Destroy(hit.gameObject);
    }
}  

function Update ()
{
    var controller : CharacterController = GetComponent(CharacterController);
    transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
    var forward = transform.TransformDirection(Vector3.forward);
    var curSpeed = speed * Input.GetAxis ("Vertical");
    controller.SimpleMove(forward * curSpeed);

    if(Input.GetButtonDown("Jump"))
    {
        var bullit = Instantiate(bullitPrefab, 
            transform.Find("spawnPoint").transform.position, 
            Quaternion.identity);
        bullit.rigidbody.AddForce(transform.forward * 2000);
    }
}

@script RequireComponent(CharacterController)

Well from my experience if the error log says you should have a semicolon at a certain line, and that line of code does have a semicolon, then in some preceding line you are missing a semicolon.

The line that the error says there is a problem is the line where it first noticed the problem. Doesn't necessarily mean the problem is on that line. So if it's not obvious from that line, work backwards to find it.

Other things that are known to have sent the same error message are missing a few brackets, and incorrectly writing variables.

I would suggest posting the script like Derek said so we can proofread it. It's easy to read what you think you wrote rather than what you actually wrote.

Hopefully this helps you "make sense" of the error. C:

Annoying error that does not make sense

It is the: "Health Control.HITS +=1;"

You pointed correctly out the bad code.

The reason it doesn’t work is that you have a space between Health and Control which is not allowed.

This answer contained follow up information that have now been appropriately added to the original question.

Thank you everyone for helping! I have finally fixed a long series of errors :/ I am learning and hopefully this wont happen again.