Instantiating a prefab error

Hello I am making a building game and i got this strange problem, Whenever i try to instantiate my cube prefab it wont work, so here is the script and can you guys try and find this error please, Thank you! The error is located in the build function.

var blockLayer : LayerMask = 1;

var range : float = Mathf.Infinity;

var hit : RaycastHit;

var Dirt : Transform;

function Update () {

if (Input.GetMouseButtonDown(0))

Build();

if (Input.GetMouseButtonDown(1))

Erase();

}

function Build() {

if (HitBlock()) {

var Dirt = Instantiate.Dirt;

Dirt.transform.position = hit.transform.position + hit.normal;

}

}

function Erase() {

if (HitBlock())

Destroy(hit.transform.gameObject);

}

function HitBlock() : boolean {

return Physics.Raycast(transform.position, transform.forward, hit, range, blockLayer);

}

If (hitblock ())

This line makes no sense.

It makes alot of sense function Hitblock is a raycasthit so i can place my blocks with raycast

But if, to my knowledge compares something you are not comparing anything. Also by saying hitblck() you are saying if (function). How can or even still, why would you ask if function. Makes no sense.

Well obviously your not gonna help me so goodbye.

Ok. Cant wait to see what others say. By the way, the console usually makes it quite clear what the error is.

Reading issues?
Goodbye.

Oh…
Also,
Instantiate.dirt.
Normally it is…
Instantiate(object, position, rotation)

:.?!!

I figured it out thx for your help dick head

Whats the point of unity forums and answers when dick heads like you cant help people, its so sad that i asked for help nicely but i didn’t get any help but then i had to do it on my own.

Im just not gonna go on here if people are not gonna help i will do it on my own, Im happy now because i figured my problem out and i can continue on my game

Edit.
See below.

Ok you are marked for no help.
How am i a dick head?

I offered help.
Wow. Merry f mass to you.

If some one else can come in here and just spot he error, i would love to know what it was.
If it was anything i suggested, well, i’ll just leave it at that.

Oh and you declared var Dirt twice knob.

the if statement is checking a boolean value, so it is legitimate , but , as this code is not even in a code block , most people are just not going to read it.

OP : Getting snotty about things wont help either, haha.

Dont worry mate i fixed it already like i said. you two are just useless and dont know what the fuck your doing. If you guys cant figure out that error then you guys are fucking noobs man i figured it out less then 10 min. Obviously you guys dont know what the fuck your doing.

Yes i did theres reasons why i did that So i can instantiate it and 2. var Dirt : gameObject; is apart of that instantiate so whos the real dumb fuck? You because you dont know what the fuck your talking about.

Oh and yes there is a transform on that dirt variable but i changed it to gameobject. And other things i changed to make it work.