mIRC Home    About    Download    Register    News    Help

Print Thread
#199328 12/05/08 07:17 PM
Joined: May 2008
Posts: 3
G
Ghrem Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
on *:TEXT:*:#:{
notice $me $regex($1-,%cusslist)
if $regex($1-,%cusslist) >= 1 {
inc %User $+ $nick 1
set %UserCount $var(User $+ $nick,1)
if %UserCount == 1 {
msg # %UserCount : Hey $nick please watch your language, this is your only warning.
}
}
}



Why will that not work?

Ghrem #199332 12/05/08 07:39 PM
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Because you forgot the % in $var smile ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Ghrem #199333 12/05/08 07:40 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Ghrem
on *:TEXT:*:#:{
notice $me $regex($1-,/\b( %cusslist )\b/gi)
if $regex($1-,/\b( %cusslist )\b/gi) >= 1 {
inc %User $+ $nick 1
set %UserCount $var(User $+ $nick,1)
if %UserCount == 1 {
msg # %UserCount : Hey $nick please watch your language, this is your only warning.
}
}
}

Why will that not work?


The regex format didnt execute nothing look in your quote I made the regex routine execute, but make sure your %cusslist is structured has mybadword|badword|whatever|blah|ok


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Wims #199334 12/05/08 07:42 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Wims
Because you forgot the % in $var smile ?


% is not needed in command $var

alias try {
set %test ajwrwrworjwarwior
echo -a $var(test)
}

should return 1 smile


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #199341 12/05/08 08:12 PM
Joined: May 2008
Posts: 3
G
Ghrem Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
Yeah, but I need to use $var() in order to get the name of the variable with the usersnick, since I can't seem to figure out how to get the value of that variable the same way I set it. $var just returns the name of the variable... still can't seem to get the value out of it. I don't need to echo it, I need to IF against it.

Last edited by Ghrem; 12/05/08 08:13 PM.
Ghrem #199342 12/05/08 08:19 PM
Joined: May 2008
Posts: 3
G
Ghrem Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: May 2008
Posts: 3
I don't need help on the regex, the %cusslist is the full regex. Just the variable issue.

Ghrem #199344 12/05/08 08:29 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Sorry dude miss read, it looks like you want the data instead of the name of the var, you see your using $var(variable,1) that will produce the name, now if you want the data $var(variable,1).value will do that

so $var($+(User,$nick),1).value or $var(User $+ $nick,1).value

same..


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #199350 12/05/08 08:57 PM
Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
Thanks, i was not aware about that wink


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #199351 12/05/08 09:19 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Yw


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard