With the cell arrays (dynamic arrays), you can simply use the features provided with them:
PHP Code:
public ArrayPush(Array:array, number)
{
ArrayPushCell(array, number)
if( ArraySize(array) > MAX_ARRAY_SIZE )
{
ArrayDeleteItem(array, 0)
}
}
No need to do all that extra work when it's already built in.
__________________