Some very common problems are
How do I make an array of variables?
How do I set and retrieve a variable for any nick?
Well, this information is in the mIRC help file, but it's extremely well
/say % [ $+ [ $1 ] ]
There it is, the big secret. It may not look like much, but in fact its
the basis of arrays (and the related topic of storing and looking up
stuff for each nick.)
Sadly, Khaled stopped short of explaining how
that code is any use, so here goes. What the code above does is to
stick a % sign on front of whatever $1 is to get a variable name,
re-evaluate it and then /say it. So if $1 was "test", mIRC would say
whatever was in %test. It would not say "%test"!! (That's important.)
Try this from any editbox:
The double slash there is important. Because that was from an
editbox, mIRC would have just echoed "% [ $+ [ test ] ]", letter for
letter, if you had used a single slash.
/set %message hello
/set %test message
//echo -a % [ $+ [ %test ] ]
The double slash forces it to
evaluate what it is given, resulting in it echoing "hello" as it should
do. However, when scripts are in aliases or remotes (where they
belong!), this is not needed. The help file says:
In scripts, all lines are assumed to start with a command, so you
don't need to use the / command prefix."
In fact, everything is treated as if it started with a //. Variables and
identifiers are (nearly) always evaluated when in a script.
Occasionally you need to force mIRC to evaluate them "more" or
"again", and that is what the [ ] in the example above are for.