%!a is being evaluated as a variable. Is this something that shouldn't happen? there is an array of different characters that a variable may be composed of, ! being one of them.
Unlike identifiers, you cannot escape variables like that - mIRC will try to fetch the variable named "%!a", which was probably empty in your case. Use "% $+ a" instead.