unity scripting 3.x button script chapter 1

I just got this book and i’m in chaper 1 but i cant get the script to work

here’s what i scripted:

#pragma strict

var initPos : Vector3;
var movePos : float = 0.1;
var Platform : Transform = null;
var isPressed : boolean = false;

function Start () {	
	initPos = transform.localPosition;
}

function MoveButton(){
	if(!isPressed){
	Platform.GetComponent ( platform ).Activated();
----------------------------^ what's this???
	transform.position.z = transform.position.z - movePos;
  isPressed = true;
  Hit.gameObject.GetComponent("Button").MoveButton();
--^ what's this???
  }
  	
}
function OnControllerColliderHit (Hit :ControllerColliderHit){
	if (Hit.gameObject.name == "Button"){
	}

}

function Update () {

}

Here’s the errors that occur

Assets/History/Chapter 1/custom_scripts/Button.js(17,3): BCE0005: Unknown identifier: ‘Hit’.

Assets/History/Chapter 1/custom_scripts/Button.js(14,33): BCE0005: Unknown identifier: ‘platform’.

what have i done wrong

I edited your question and formatted the code for you. Please learn how to submit questions correctly.

The error messages tell you that on line 14 the compiler has come across a variable called platform that it does not recognise. You do not appear to have declared this variable. Also, on line 17 you use a variable called Hit. Again, this is not declared in your code anywhere.

so should i have a var Hit in the top of the code and also should i change var platform : transform = null to another value