Im trying to assign a value to a mineral that is spawned by destroying an asteroid, and iv had a look at the old AUM examples but i just cant get it to work, the code that im using looks like this:

//////////////////
ENTITY* temp_ptr;

var minerals[1000];
var mineral_index = 0;
//////////////////

action green_crystal()
{
minerals[mineral_index] = handle(my);
mineral_index +=1;

///other code//////////

///////////////////////
function moveG(number)
{
temp_ptr =ptr_for_handle(minerals[number])
temp_ptr.y +=50;
}

but when I call it while playing with ex. moveG(1);
nothing happens, I know that the AUM examples are for A6 so the problems are probably because of that, and iv been searching the forums for a few hours without finding anything that can help me.


Would really appreciate some help with this.
Thanks