mIRC Homepage
I made a script that required I have a list of numbers sorted.. but it needed negative AND positive numbers sorted. Unfortunately, sorttok seems to run off of absolute value so horrible things have happened.

I've tried making a bubble sort of my own, but I can't get it to work.

Don't suppose anyone would take the time to share a bubble sort script (or maybe something faster would be nice) that can do negative numbers right?
$sorttok seems to be working ok here with negative numbers...

Code:
//echo -a $sorttok(4 5 1 10 15 2 -4 -1, 32, n)


result...

-4 -1 1 2 4 5 10 15
From versions.txt of mIRC v6.1:
Code:
8.Fixed $sorttok() not handling negative numbers.

Did you update?
I upgraded and it works EXCEPT when there is something after the negative number.

That is, I have to do this:

-216 Chaz.-215 Ranma.10 Sigma.20 Rena

And sort it in order from least to greatest.
You're right, this has been reported and will be fixed in the next version. At the meantime, see qwerty's post for a way around.
© mIRC Discussion Forums