mIRC Home    About    Download    Register    News    Help

Print Thread
#3509 26/12/02 02:17 AM
Joined: Dec 2002
Posts: 37
X
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Dec 2002
Posts: 37
I recently made a Trivia Script. Which keeps scores in a INI File with the format shown below.

My question is... How could I get a script to recall the top 5, 10 and 20 highest scores along with the name of the person. Thanks. smile

INI File format...
[Xx_InSaNe_xX]
Score=100

#3510 26/12/02 04:14 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
One way is to create a hidden, sorted @window and pull the last 5, 10 or 20 from that. You might need to zero-pad to get it to sort correctly. /filter can sort too, but that's probably more work than you need since you're keeping the items in an .ini file rather than a tab-delimited flat file.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard