mIRC Homepage
Posted By: SithLORD $calc problem - 16/01/07 09:20 PM
alias stats {
set %Lin 1
:di
set %nickigual $comchan($me,%lin)
did -a stats 3 0 1 $chan(%nickigual).topic $chr(9) $nick(%nickigual,0,o) $chr(9) $nick(%nickigual,0,v) | did -a stats 5 0 2 $server
inc %Lin
if %Lin > $comchan($me,0) { halt }
goto di
}

i want do a multiple $calc with those $nick(%nickigual,0,v)

6
10 i want do like total voice 16

any help thnx so much


Posted By: RusselB Re: $calc problem - 17/01/07 01:44 AM
If I understand you correctly, you want to put the total number of voices of all of your channels into the display of the dialog..not just the current channel. If so, here's a re-write of your code.
Code:
alias stats {
var %ops = 0, %voice = 0, %Lin = 1, %b = $chan(0)
while %Lin <= %b {
did -a stats 3 0 1 $chan(%Lin).topic $chr(9) $nick($chan(%Lin),0,o) $chr(9) $nick($chan(%Lin),0,v)
did -a stats 5 0 2 $server
inc %ops $nick($chan(%Lin),0,o)
inc %voice $nick($chan(%Lin),0,v)
inc %Lin
}
did -ra stats <ID> Total Ops: %ops
did -ra stats <ID> Total Voice: %voice
}


I'm going to presume that this alias is designed to work with a dialog that you already have, so you'll have to fill in the ID's for the last two lines that require them.

If you have any problems understanding my code, and if I got your request correct, specify what you don't understand and I'll try to clarify.
Posted By: SithLORD Re: $calc problem - 17/01/07 04:56 AM
voice channel 2: 10
voice channel 1: 10

i have this , 2 channeles , 10 voice each, i want do this

voice channel 2: 10
voice channel 1: 10
total voices : 20

thnx i hope understandme

Posted By: SithLORD Re: $calc problem - 17/01/07 04:56 AM
voice channel 2: 10
voice channel 1: 10

i have this , 2 channeles , 10 voice each, i want do this

voice channel 2: 10
voice channel 1: 10
total voices : 20

thnx i hope understandme

Posted By: RusselB Re: $calc problem - 18/01/07 12:15 AM
That is similar to what my code does. Differences are that my code would have the channels in the order of:
Channel 1
Channel 2

Totals:

and my code uses a dialog interface, which I presumed you already had, since your code had dialog commands in it.

If you don't want it in a dialog, specify how you want the information displayed (ie: to all in channel, to you in channel, or some other method).

BTW: Please be careful when posting, you accidentally (I hope) posted your reply twice.
Posted By: SithLORD Re: $calc problem - 18/01/07 03:14 AM
my error , sorry for that and preciate about the code
© mIRC Discussion Forums