The problem is here: (and in the other /timer command)
Code:
.timerawayloggeridle 0 30 if ($idle >= $calc(3600 * $remove(%z,h)) { afk2 | .timerawayloggeridle off }


Three reasons:
- You forgot a parenthesis in the condition.
- When you launch a timer, $idents & %variables which are 'affixed' with parenthesis in conditions or $ident()
are not right away evaluated. They'll just be evaluated when the timer performs the command (passed in parameters),
after the delay specified (here 30 seconds). Knowing that, you can now see your variable %z, created via /var,
will not exist 30 seconds later.
- In timers, you can not right away use "{ } |" caracters, because mIRC evaluates them.

So, you can try one of these two solutions:

1°) $(<value>,) allows not to evaluate the value. And with spaces in the condition, $ident and %variable are evaluated
when you launch the timer, so not after the delay.
Code:
.timerawayloggeridle 0 30 if ($idle &gt;= $calc(3600 * $remove( %z ,h)) ) $({,) afk2 $(|,) .timerawayloggeridle off $(},)


2°) You put yours commands in an alias, like CheckIdle here, with %z as parameters, because it's the only %variable
which has to be right away evaluated.
Code:
.timerawayloggeridle 0 30 CheckIdle %z

; You create a new alias :
alias CheckIdle {
if ($idle &gt;= $calc(3600 * $remove($1,h))) { afk2 | .timerawayloggeridle off }
}


I hope that will work. If it's not the case, consider it like an idea on the good way wink