%!variable does not work. You should instead use % $+ variable, like this:

Code:
//set %x $!ticks | timer 1 1 echo -a % $+ x