I need help with : Unknown Identifier: 'DirtPrefab'

I am having trouble, and I with placing blocks in my “Simulated minecraft game”. Here is the project attached, and the code. I need help soon!
#pragma strict

function Start () {
var DirtPrefab : Transform;
}

function Update () {
var Block = Instantiate(DirtPrefab, GameObject.Find("PlacePoint").transform.position,
Quaternion.identity);
}

I have a dirt block prefab called: Dirt and it’s a prefab. I also have an invisible crosshair called PlacePoint that follows the camera and is at the center of the screen.

No, this hurts my head.

You declare global variables outside of functions.

var DirtPrefab : Transform;

function Start () {

}

This is the answer to your question, but there is more here that could be fixed.

You are just asking for something to break using GetComponent the way you are.

Use GameObject.Find in your start function as it is very slow, and you really only need to do it once in your example :

var placePointTransform : Transform;

function Start () {
    placePointTransform = GameObject.Find("PlacePoint").transform;
}

Put it all together and you have :

var DirtPrefab : Transform;
var placePointTransform : Transform;

function Start () {
    placePointTransform = GameObject.Find("PlacePoint").transform;
}

function Update() {
    var Block : Transform = Instantiate( DirtPrefab, placePointTransform.position, Quaternion.identity );
}