C_script
first: temp_ptr =ptr_for_handle(minerals[number])
is missing an " ; "
What this actually does is storing a handle of the mineral
or whatever is running the action to an array.
Later in the moveG function, a pointer is restored from
the array, given an indexnumber.
So the first thing you need to check, is weater the
action gets called (meaning, if an entity is beeing
"stored" in the array.
So watch the minera_index counter, or some other
indicator that this part works.
Then check if the move_g function is beeing called, AFTER the
array was filled with pointers.
If you dont have a nullpointer error, then some entity
is beeing moved (maybe not the mineral you where looking at)
Also the first entry is 0 and not 1
(for 1 you need to have at least two minerals referenced)
Also include some savety features, (like:
if(number>=mineral_index) return;
)
Especially when working with dynamically used arrays and pointers.