Help Instantiating Prefab.

Simple script has a compiling error.

var bulletprefab:Transform;

function Update ()

{

if(Input.GetButtonDown(“T”));
{
var bullet = Instantiate(bulletprefab,GameObject.Find(“SpawnpointA”).transform.position, Quaternion.identity);
}

}

This is what I have. The error thingy says: Unexpected Token: var
Whats wrong with it? Like I’m clueless.

Thats a lot of paramters being passed, could be one of those are not getting needed info. best to unit test each one before running instantiate on them.

for instance:
// break this down
spawnPoint = GameObject.Find(“Spawnpoi ntA”);
spawnPosition = spawnPoint.transform.position;

Debug.Log(spawnPosition);

once your params are good then move onto the instantiate()
I would also try removing the var

here is a scripting reference on it to help out

This line:
if(Input.GetButtonDown(“T”)); ←

after if statement there should not be line ending ;