This function seems to fail anytime I try to pass the objects found into another script. It gives a null reference exception. I have a similar set of code running fine using only unity premade functions.
var wheels = GameObject.FindGameObjectsWithTag("wc");
for(var cores : GameObject in wheels)
{
print(cores.name);//this line works fine
//var temp : GameObject = cores[0]; //should I be using this?
cores.GetComponent(ScriptGeneralDeck).draw(cores.transform, cores.name, 5,5,0 );
//changing cores.name to cores.transform.name causes errors claiming to destroy assets
}