It's certain that $nick doesn't have a value, you're calling the alias with a timer, local identifier such as $nick are lost there. You need to pass the $nick value as a parameter somehow, but a nice way to do it here is to use $ctimer, replace $nick by $ctimer in your alias and it should work.
Note that you may change the timer name in the future, which would break it, the typical way of handling it is to pass the nickname as a parameter of the alias.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel