mIRC Home    About    Download    Register    News    Help

Print Thread
variable problem #63679 11/12/03 10:08 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
on *:join:#:{
if ($nick == $me) {
var %e = $calc($nick(#,0,o) +$nick(#,0,v))
while (%e) {
.msg $nick(#,%e) hi smile
dec %e
}
}
}
red line doesn't set %e var as total of voices and ops or only ops, why?

Re: variable problem #63680 11/12/03 10:21 AM
Joined: Oct 2003
Posts: 80
R
RockHound Offline
Babel fish
Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
check your code the space after +

var %e = $calc($nick(#,0,o) +$nick(#,0,v))

to

var %e = $calc($nick(#,0,o) + $nick(#,0,v))

now try



RockHound
Re: variable problem #63681 11/12/03 10:26 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
there should be as I wrote smile
but although I tried two of them

Re: variable problem #63682 11/12/03 10:49 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
result is same = negative I mean

Re: variable problem #63683 11/12/03 10:49 AM
Joined: Oct 2003
Posts: 80
R
RockHound Offline
Babel fish
Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
Funny the only way i can get it to work is to use it as an alias


RockHound
Re: variable problem #63684 11/12/03 11:01 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
am bored, it still doesnt work as alias too

Re: variable problem #63685 11/12/03 11:04 AM
Joined: Oct 2003
Posts: 80
R
RockHound Offline
Babel fish
Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
alias
-----
test {
set %e $calc($nick(#,0,o) + $nick(#,0,v))
while (%e) {
echo $nick(#,%e) hi
dec %e
}
}
-----
just typed in /test and it worked


RockHound
Re: variable problem #63686 11/12/03 11:23 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
doesnt work under join event
mirc ver: 603

Re: variable problem #63687 11/12/03 12:21 PM
Joined: Jan 2003
Posts: 28
E
emkookmer Offline
Ameglian cow
Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
Code:
 
on *:join:#:{
  if ($nick == $me) {
    /himsg
  }
}

alias -l himsg {
  set %e $calc($nick(#,0,o) + $nick(#,0,v)) 
    while (%e) {
      echo $nick(#,%e) hi 
    dec %e
  }
}

 


try this code
maybe that will work

Re: variable problem #63688 11/12/03 12:33 PM
Joined: Apr 2003
Posts: 414
Adrenalin Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
You code not work because then you join some channel the ircd send to the mIRC the channel nicks in the reverse joined-order .. And last who join is you.. And you nick is first in the /name response..

<- :Adrenalin!~adrenalinl@*.md JOIN :#moldova
<- :*.undernet.org 353 Adrenalin = #moldova :Adrenalin syry igorash doctorul Vall jencik mariella kazaz imhotep^^....
<- :*.undernet.org 366 Adrenalin #moldova :End of /NAMES list.

You script start work's too early when mIRC don't know all nick's from channel. You script must start after the End of /NAMES list. event..
Try that

Code:
raw 366:*:{
  var %Channel = $2
  echo zz %Channel
  var %e = $nick(%Channel,0,o,v)
  echo zz %e
  while (%e) {
    echo -s zz $nick(%Channel,%e,o,v) hi
    dec %e
  }
}

Last edited by Adrenalin; 11/12/03 12:53 PM.

mIRC Chm Help 6.16.0.3 Full Anchored!
Re: variable problem #63689 11/12/03 03:55 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
When you join a channel mIRC knows of only one user, you. You have to wait till the names list has been recieved, which is Raw 366 - End of /NAMES list.
Code:
on me:*:join:#:{
  inc -u99 %joined. $+ #
}
raw 366:*:{
  if %joined. [ $+ [ $2 ] ] {
    var %i = 1
    while  $nick($2,%i,ov) { echo -a $ifmatch | inc %i }
    unset %joined. $+ $2
  }
}

Re: variable problem #63690 11/12/03 06:12 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
:\ doesnt work properly

Re: variable problem #63691 11/12/03 06:42 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You must change the blue portion to do what you want. smile
Code:
    while  $nick($2,%i,ov) { [color:blue]echo -a $ifmatch[/color] | inc %i }

Re: variable problem #63692 11/12/03 08:34 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
thanks mad is there any idea out of this?

Re: variable problem #63693 12/12/03 08:54 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
doesnt anyone understand me? all of them are not working!!

Re: variable problem #63694 12/12/03 10:24 AM
Joined: Oct 2003
Posts: 80
R
RockHound Offline
Babel fish
Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
why does it not work properly? we can't help if you do not give detail


RockHound
Re: variable problem #63695 12/12/03 11:11 AM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
it doesn't work all the times..

Re: variable problem #63696 12/12/03 11:43 PM
Joined: Oct 2003
Posts: 80
R
RockHound Offline
Babel fish
Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
why?????????? does it throw an error? or return something other then what is the correct return?

did your try lori's script or Adrenalin's if so what return did you get or what error? be specific. we cannot help you with:
Quote:
it doesn't work all the times..


as it gives us nothing to go on. show us your code. show us your return, show us an error anything to help you.

--------
i just tried Adrenalin's script on both hop and join works fine. you just have to change the echo to /msg or /say or whatever you want to do. If it is not working try it is a fresh copy of mirc.

Last edited by RockHound; 12/12/03 11:58 PM.

RockHound