I don't understand why would you like to set opposite values, but anyway, the last 4 lines need to be looking like:
if (%away.pager == 0) { set %away.pager 1 }
else { set %away.pager 0 }
if (%away.logging == 0) { set %away.logging 1 }
else { set %away.logging 0 }
or in short
set %away.pager $iif(%away.pager == 1,0,1)
set %away.logger $iif(%away.logger == 1,0,1)
The reason why
else is required instead of another
if, is because of the way if-then-else works.
If, for example, %away.pager is set to 0, both
if (%away.pager == 0) and
if (%away.pager == 1) will be executed, as the first statement sets it to 1 before moving to the next one, and you'll end up with the same value.
Again,
else would solve it.