mIRC Homepage
Posted By: sparta $gettok($chan($2).mode,1,32) - 17/01/06 10:44 PM
I trying to solve this:
Code:
; Alias
_cmode {
  set %_mchar
  if ($1 isincs $gettok($chan($2).mode,1,32)) { %_mchar = 1 }
  return $iif(%_mchar,-,+) $+ $1
}
_mcode {
  if ($1 isincs $gettok($chan($2).mode,1,32)) { set %tmpmd $+ $1 $chr(45) | return 1 }
  else set %tmpmd $+ $1 $chr(43)
}
;    Remote
menu channel {
modes
; [color:red]working[/color]
.$iif($_mcode(s,$chan),$style(1)) Secret $chr(91) %tmpmds $+ s $chr(93) :mode $chan $_cmode(s,$chan)
; [color:red]not working[/color]
.$iif($_mcode(C,$chan),$style(1)) No CTCP's $chr(91) %tmpmdw $+C $chr(93) :mode $chan $_cmode(C,$chan)
}

As you see i have marked it with working and dont working, the modes is grabbed the same way, the only diffrent is that "s" is a old flag (secret) and c (No Colors), this flags is used on quakenet. somone that can help me solve this problem? :tongue: if you dont know what i mean, plz try the code ?



As u see it's the popups i working on.the firrst "c" look as it should, then the big C missing the - signt.. +r looks ok, and i dont know how to solve it.. i hope someone can help me solve this? been trying a while now, and the same result all the time frown
Posted By: captain_comic Re: $gettok($chan($2).mode,1,32) - 18/01/06 07:59 AM
Uuuhh .. I see something strange in the menu for CTCP: %tmpmdw $+C .. Shouldn't this be: %tmpmdc $+ C (mind the space between $+ and C). Another thing: is there a difference between %tmpmdc for colors and %tmpmdC for CTCP?
Posted By: RusselB Re: $gettok($chan($2).mode,1,32) - 18/01/06 08:09 AM
variable names are case insensitive in mIRC.

%TMP, %tmp, %TmP, & %tMp all become the same.

I only showed 4 examples, but that should be sufficient.
Posted By: DaveC Re: $gettok($chan($2).mode,1,32) - 18/01/06 11:30 AM
Quote:

; not working
.$iif($_mcode(C,$chan),$style(1)) No CTCP's $chr(91) %tmpmdw $+C $chr(93) :mode $chan $_cmode(C,$chan)


$iif($_mcode(C,$chan),$style(1)) No CTCP's $chr(91) %tmpmdC $+ C $chr(93) :mode $chan $_cmode(C,$chan)

%tmpmdw is not set by calling $_mode(C,$chan) %tmpmdC is!
Posted By: captain_comic Re: $gettok($chan($2).mode,1,32) - 18/01/06 12:47 PM
So it is true: scripters are conceited :tongue:
Posted By: DaveC Re: $gettok($chan($2).mode,1,32) - 18/01/06 10:11 PM
My error, you did indeed state it right back there, I missed it somehow, on the first read [ actually I read yours about 3 times and still missed it frown ] I seemed to only see the bit about the $+C which made me feel that the code error he was going on about might not exist at all since he isnt showing us the exact code (aka its been altered before it got here, maybe onlyt a space removed, but maybe anything). Again High 5's to u for the find.

/me goes to get some perscription glasses
Posted By: captain_comic Re: $gettok($chan($2).mode,1,32) - 18/01/06 10:22 PM
LOL, that explains. You found it too then wink By the way, I also meant RusselB who answered my rhetorical question to sparta. I wanted sparta to find out ... Well, we all just like scripting and helping others people.
Posted By: sparta Re: $gettok($chan($2).mode,1,32) - 18/01/06 10:47 PM
the $+C was something that happened when i pasted the code here, it dosn't look like that in my mirc..
© mIRC Discussion Forums