if condition { }
else { }

try to replace the second if by elseif

Code:
elseif (!%autoaw) && (%aw) && %away.system.auto.status == on {