sebastiangohhy
You have to zero pad numbers if you want them to sort properly - the array sort does a text based sort.
so, when you put a number into the array use zeropad(number,digits)
when you need to use then number later, convert it back to a number using int(arrayvalue) or float(arrayvalue)...