very simple shoot script keeps getting error!!!

i made a very simple shoot script to try and shoot a fireball when I clicked, but for some reason I keep getting an error no matter what I do!

script:

var fireballPrefab : Rigidbody;

function Update () {

if(Input.GetButtonDown(“Fire1”)){

var fireballInstance = Instantiate(fireballPrefab, 
GameObject.Find("magicspawn").transform.identity, 
GameObject.Find("Main Camera").transform.rotation);

}

}

Error:

NullReferenceException: Object reference not set to an instance of an object
fireballshoot.Update () (at Assets/fireballshoot.js:7)

I'm not sure that "transform.identity" is anything ... I could be wrong though. Try 'transform.position' instead.

var fireballPrefab : Rigidbody ;
var magicSpawn : Transform ; //drag your spawner into this slot
var cam : Transform ; //drag your camera here ; could also be set with Camera.main I suppose
var fire : String = "Fire1" ; 

function Update(){
   if(Input.GetButtonDown(fire)){
        ShootOrSomethin() ;
   }
}
 
function ShootOrSomethin(){
   var fireballClone : Rigidbody ;
   fireballClone = Instantiate(fireballPrefab, magicSpawn.position, cam.rotation) ;
}

Or… Are you passing the FireballPrefab into your routine?
You do this by inspecting the game object that the script is attached to. In the instpactor you should see the placeholder for the fireballprefab. look in your prefab folder an drag the prefab in question into that placeholder slot.

NullReferenceException: Object reference not set to an instance of an object fireballshoot.Update () (at Assets/fireballshoot.js:7)

This error message, like JerryCic mentioned has more to do with the fact that what ever reference you are using for you fireball is either empty or unassigned.