I don't understand, if there is no parameter, only $1 will be filled and you can check that $2 is $null, or that $0 is more than 1 to know that. What's the bug exactly? Can you give a code which reproduces the issue?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel