Subtract from a variable?

Hey guys,

Got a script here.

 var Lives = 3;

function OnTriggerEnter(other : Collider){

	if(Lives < 1)

	{

		 Application.LoadLevel(0);

		 print("YOU LOSE!");

	}

	

	else

	{

		GameObject.Find("First Person Controller").transform.position = Vector3(0, 10, 0);

		print(Lives);

		Lives --1;

	}

	



}

Basically I want it to reset my player to 000 and subtract from “Lives” until it becomes less than 1. When that happens, it respawns you to the main menu. My problem is with the line:

Lives --1;

I have used the “–” before with perfect results, but now I get an error telling me to put a semicolon at the end of it. If I do “=-” it returns no errors, but it changes my “Lives” variable to -1 everytime I die.

Any help on getting the – thing to work?

Thanks .

Lives --;
Lives ++;
Lives -= 2;
Lives += 2;
Lives = Lives - 1;

yeah, you shouldn’t have a number after Lives–
Either write Lives–; or Lives -=1;

Ah! Thanks a ton friends!