mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 23
X
x3RiouS Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2004
Posts: 23
In the mIRC help this is the info. I get about setting variables:
Quote:
/set [-snzuN] <%var> [value]

This sets the value of %var to the specified value.

If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.

The -z switch decreases %var until it reaches zero and then unsets it.
The -n switch makes it treat value as plain text.


Well, in my last post I got this script as an answer to a question:
Code:
on *:text:!server *:#chan:{
  if $nick isop #chan { set %server. $+ # $2- } 
}
on *:TEXT:!server:#chan:/msg $chan $iif(%server. [ $+ [ $chan ] ],$ifmatch,None.)


1) When setting the variable, what does: ". $+ # $2- " mean?
2) In the $iif Identifier, what does "[ $+ [ $chan ] ]" mean and will $ifmatch return the message in %server?

Joined: Dec 2003
Posts: 199
K
Vogon poet
Offline
Vogon poet
K
Joined: Dec 2003
Posts: 199
1) When setting the variable, what does: ". $+ # $2- " mean?
$+ combines separate items. Here's another Example, Say I had A and B. If I wanted to combine them I'd use:
//say A $+ B And it'd return: AB instead of A B
2) In the $iif Identifier, what does "[ $+ [ $chan ] ]" mean and will $ifmatch return the message in %server?
[ $+ [ $chan ] ] is used for evaluating the script. It's used to connect two things together that's more "accurate" than just using $+ alone, I guess...
Most of the time [ $+ [ $chan ] ] is used for combining a %variable. to an identifier($chan,$1,$server,ect).
And Yes, I'm sure the $ifmatch, will return if the iifmatch returns some type of result.
Hope this helps, Somewhat. grin


Want to Link Servers? PM Me
- EliteIRC.dyndns.org -
Joined: May 2004
Posts: 23
X
x3RiouS Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: May 2004
Posts: 23
Well...I hope I've understood it.
10q very much.

Last edited by x3RiouS; 10/05/04 06:10 PM.

Link Copied to Clipboard