Hi!
I'll try to explain as good as I can:
I would like to have a notice output, that look like this:
-RPGServ:#testscript- <Roll for Gasten [20[1d4]]: 4 2 4 4 1 3 1 4 3 3 1 4 1 3 1 4 3 3 1 3 >
to be sorted in value sizes (I don't know what it is in english, but it is similar to what happens with $sorttok).
The code I've managed to come up with looks like this:
on *:NOTICE:*:*: {
var %resultlistrem = $$5-
var %resultlistrem = $deltok(%resultlistrem,-1,22)
; Deletes that last >
var %resultlistrem = $sorttok(%resultlistrem,22,n)
echo -a %resultlistrem
}
; 22 == [[space]]
...And when I run it doesn't return any echo.
(I've understood that there isn't anything in the variable %resultlistrem, more of that in the following part:)
After hours of debugging i tried to see where the variable destroys (using this code:
on *:NOTICE:*:*: {
var %resultlistrem = $$5-
echo -a %resultlistrem
var %resultlistrem = $deltok(%resultlistrem,-1,22)
if %resultlistrem {
echo -a Yes
}
elseif !%resultlistrem {
echo -a No
}
var %resultlistrem = $sorttok(%resultlistrem,22,n)
echo -a %resultlistrem
}
). The output where this:
-RPGServ:#testscript- <Roll for Gasten [20[1d4]]: 4 1 1 1 1 1 3 4 3 4 2 1 4 1 4 3 3 3 2 4 >
4 1 1 1 1 1 3 4 3 4 2 1 4 1 4 3 3 3 2 4 >
No
1 1 1 1 3 4 3 4 2 1 4 1 4 3 3 3 2 4 >
No
Now, why does it repeat itself? And why is the two first numbers in the second echo gone? And more important: what should I do to get mIRC returning a sorted version of that list?
Thankfully,
Crap aka Gasten