it says in the help file and i qupte
The double $$ means that this command will only be executed if a parameter is specified.
I can see how it could me mis-inturpertated(SP?!) but generally, if you read the help file, the $$ and it's uses are one of the first things you use. Look at the default aliases that come with mIRC.
Your argument is invalid for the %%var. How is mIRC supposed to know that the 2nd % isn't part of the variable name. I have seen many scripts use %%varname to mark the variable as a tempory variable to been cleaned up later. You
CAN'T create an alias like "alias $myalias { stuff }"