its an alias designed to check a file and put the orders from high to low.
eg.
if in sometext is
1 1
3 3
2 2
4 4
hello 6
you 2
it should be after the alias
hello 6
4 4
3 3
you 2
2 2
1 1
the script I made to do it:
alias readi {
%a = 2
%b = $lines(D:/Themirc/sometext.txt)
%g = 1
While (%a <= %b) {
%c = $read(sometext.txt, %a)
%d = $gettok(%c,2,32)
%e = $read(sometext.txt, %g)
%f = $gettok(%e,2,32)
if (%d >= %f) {
write -l $+ %g Sometext.txt %c
write -l $+ %a Sometext.txt %e
inc %a
inc %g
}
elseif (%d <= %f) {
inc %a
inc %g
}
}
}
what it does is get line #1 and #2, the second value (so a number), checks up if #2 is higher then #1, if so place #1 on line2, and #2 on line 1. then checks #2 and #3. etc. etc.
unfortunatly I get an error in the while loop, ( I dont know why )
please can anyone help?