Environmental Death script

I am trying to use this script that is supposed to re
set my character controller to the spawn point when it touches a plane but yet this script is having compiling errors when i try to put it on the controller.

specifically these lines

" function LateUpdate();
{
if(dead)

{
    transform.position = Vector3(0,0,0);"

This is the script

private var dead = false;

function OnControllerColliderHit(hit : ControllerColliderHit) {
if(hit.gameObject.tag == “Floor”)
{
dead = true;
}

function LateUpdate()
{
if(dead)
{
transform.position = Vector3(1510.397,597.7795,1255.543);
gameObject.Find(“Main Camera”).transform.position = Vector3(1510.397,597.7795,1255.543);
dead = false;
}
}

any help with this out be greatly appreciated

Firstly, it’s hard to read the code in your question because it’s not formatted correctly, you might want to review your question before posting it.

Now, regarding your question, you’ve missed out the closing } in your OnControllerColliderHit, that’s what is causing the compile error.

i.e.

private var dead = false;

function OnControllerColliderHit(hit : ControllerColliderHit) 
{ 
	if(hit.gameObject.tag == "Floor") 
	{ 
		dead = true; 
	}
}		<--- this is what you missed out

function LateUpdate() 
{ 
	if(dead) 
	{ 
		transform.position = Vector3(1510.397,597.7795,1255.543); 
		gameObject.Find("Main Camera").transform.position = Vector3(1510.397,597.7795,1255.543); dead = false; 
	} 
}