mIRC Home    About    Download    Register    News    Help

Print Thread
#70281 04/02/04 09:08 AM
Joined: Feb 2003
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Feb 2003
Posts: 7
Hello dear reader,

i have a problem
I will set a variable like %chat.topnick1 TeDDyBeeR
i build the variable on this way :
Code:
set %chat.topnick $+ %toptmp TeDDyBeeR

where %toptmp can be 1 to 10
The set is working
but how can i read this variable back in a echo or msg
when i have 10 topnicks in a while procedure?

Last edited by TeDDyBeeR; 04/02/04 09:09 AM.

cool The Eggdrop Freak cool
#70282 04/02/04 10:00 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
In any order...
Code:
//var %i = 1 | while $var(%chat.topnick*,%i) { echo -a $ifmatch = [ [ $ifmatch ] ] | inc %i }

or sorted...
Code:
//var %i = 1 | while %i < 11 { if %chat.topnick [ $+ [ %i ] ] { echo 2 -a % $+ chat.topnick $+ %i = $ifmatch } | inc %i }


If all 10 vars are definately set, you could do also
Descending order...
Code:
//var %i = 10 | while $var($+(%,chat.topnick,%i),1) { echo -a $ifmatch  = [ [ $ifmatch ] ] | dec %i }


Ascending order...
Code:
//var %i = 1 | while $var($+(%,chat.topnick,%i),1) { echo -a $ifmatch  = $var($ifmatch,1).value | inc %i }

#70283 04/02/04 10:15 AM
Joined: Feb 2003
Posts: 7
T
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Feb 2003
Posts: 7
it's working smile
this is what i needed smile
Thx Iori for yout rime smile



cool The Eggdrop Freak cool
#70284 04/02/04 10:29 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
No prob smile


Link Copied to Clipboard