Why won't my death function work?

var curHealth : int = 100;
var maxHealth : int = 100;
var healthtext : GUIText;

function Start () {

}
function Update ()
{
healthtext.text = "Health: " + curHealth + " / " + maxHealth;
if(curHealth < 0 )
{
curHealth = 0;
}
if(curHealth > 100)
{
curHealth = 100;
}
if(curHealth <= 0)
{
Dead();
}
function Dead()
{
transform.position = Vector3 (1, 2.5, 1);
curHealth = maxHealth;
}
}

I’m guessing you’re seeing syntax errors based on the code-snippet you posted. When you say your death function doesn’t work are you seeing the following syntax errors?

BCE0044: expecting (, found 'Dead'.
UCE0001: ';' expected. Insert a semicolon at the end.

If so, then the problem is the (accidental?) nesting of the Dead function within the Update function. I’ve reformatted the original snippet that you’ve posted (with the Start function removed). Note how the Dead() function is actually nested within the Update() function:

var curHealth : int = 100;
var maxHealth : int = 100;
var healthtext : GUIText;

function Update () {
	healthtext.text = "Health: " + curHealth + " / " + maxHealth;
	
	if(curHealth < 0 ) {
		curHealth = 0;
	}
	
	if(curHealth > 100) {
		curHealth = 100;
	}
	
	if(curHealth <= 0) {
		Dead();
	}
	
	function Dead() {
		transform.position = Vector3 (1, 2.5, 1);
		curHealth = maxHealth;
	}
}

The syntax errors will disappear if you change the order of your curly braces, so that Dead() is no longer nested within the Update() function, it looks something like this:

var curHealth : int = 100;
var maxHealth : int = 100;
var healthtext : GUIText;

function Update () {
	healthtext.text = "Health: " + curHealth + " / " + maxHealth;
	
	if(curHealth < 0 ) {
		curHealth = 0;
	}
	
	if(curHealth > 100) {
		curHealth = 100;
	}
	
	if(curHealth <= 0) {
		Dead();
	}
}

function Dead() {
	transform.position = Vector3 (1, 2.5, 1);
	curHealth = maxHealth;
}

If the syntax errors weren’t your problem, would you clarify what you meant by “my death function won’t work”