One these two lines
did -c $dname %idle.away.ID did -c $dname %advertise.ID
Change them to
did -c $dname %idle.away did -c $dname %advertise
I did that and no longer got the errors.