mIRC Homepage
Posted By: Ghrem $var issue? - 12/05/08 07:17 PM
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?
Posted By: Wims Re: $var issue? - 12/05/08 07:39 PM
Because you forgot the % in $var smile ?
Posted By: Lpfix5 Re: $var issue? - 12/05/08 07:40 PM
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
Posted By: Lpfix5 Re: $var issue? - 12/05/08 07:42 PM
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
Posted By: Ghrem Re: $var issue? - 12/05/08 08:12 PM
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.
Posted By: Ghrem Re: $var issue? - 12/05/08 08:19 PM
I don't need help on the regex, the %cusslist is the full regex. Just the variable issue.
Posted By: Lpfix5 Re: $var issue? - 12/05/08 08:29 PM
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..
Posted By: Wims Re: $var issue? - 12/05/08 08:57 PM
Thanks, i was not aware about that wink
Posted By: Lpfix5 Re: $var issue? - 12/05/08 09:19 PM
Yw
© mIRC Discussion Forums