mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2015
Posts: 112
B
Blas Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2015
Posts: 112
I am having an issue attempting to filter data with the filter command. It seems to be filtering data based on both token's of data rather than just the second token.

The info per user in scramstats.ini looks like this:
Code:
[Blasman13]
Games=27
Losses=10
Wins=17


However, if a user's alias begins with a numeric value, the filter command appears to be using their alias when sorting data, rather than just the number of "Wins" that appears in the second token. This is what is currently outputted by the script:
Code:
Scramble Top Players ▌ Most Wins: #1 420runedankmlgshrek () - #2 TallMist (115) - #3 69superman1233 () - #4 Roy4114 (34) - #5 Tamara_Holthuis (33) ▌ Fastest Times: #1 Ttrain15 (2.090) - #2 TallMist (2.168) - #3 Tamara_Holthuis (2.199) - #4 Jessabearpawz (2.215) - #5 Deweyoxberg (2.620)


This is current code that I am using:
Code:
ON *:TEXT:!scramtop:#blasman13: {

  IF (%floodSCRAMtop) { halt }
  SET -u10 %floodSCRAMtop On
  window -h @. | var %i 1
  WHILE $ini(scramstats.ini,%i) {
    aline @. $v1 $readini(scramstats.ini,$v1,Wins)
    INC %i
  }
  filter -cetuww 2 32 @. @.
  VAR %i 1 | while %i <= 5 {
    tokenize 32 $line(@.,%i)
    VAR %name $chr(35) $+ %i $1 $chr(40) $+ $2 $+ $chr(41) -
    VAR %list $addtok(%list, %name, 32)
    INC %i
  }
  VAR %list $left(%list, -1)
  VAR %list Scramble Top Players &#9612; Most Wins: %list &#9612; Fastest Times:
  window -c @.
  window -h @. | var %i 1
  WHILE $ini(scramstats.ini,%i) {
    aline @. $v1 $readini(scramstats.ini,$v1,Best_Time)
    INC %i
  }
  filter -ctuww 2 32 @. @.
  VAR %i 1 | while %i <= 5 {
    tokenize 32 $line(@.,%i)
    VAR %name $chr(35) $+ %i $1 $chr(40) $+ $2 $+ $chr(41) -
    VAR %list $addtok(%list, %name, 32)
    INC %i
  }
  VAR %list $left(%list, -1)
  MSG $chan %list
  window -c @.
}


Any help to fix this would be appreciated, thanks. smile

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Copypasted your code, copypasted nicks\numbers from your example - works fine. Did you check your .ini-file? May be something is wrong there.


Dont give a fish - teach to fish!

Link Copied to Clipboard