Here's a new version, perhaps it will help you debug it if it desn't work but I explain the math:
; Get EntityPitch which is -90 to 90
Pitch# = EntityPitch#(Entity)
; Change range to 0 to 180
Pitch# = Pitch# + 90.0
; Get EntityYaw which is 0 or 180? (Check this!)
Yaw# = EntityYaw#(Entity)
; Add Yaw, which is 0 or 180 to Pitch which is 0..180, to get 0..360.
Pitch# = Pitch# + Yaw#
; Divide Pitch (0..360) by 90 (360/4) and round it down to get an integer 0..3.
Face = Floor(Pitch# / 90.0)
; Get EntityPitch which is -90 to 90
Pitch# = EntityPitch#(Entity)
; Change range to 0 to 180
Pitch# = Pitch# + 90.0
; Get EntityYaw which is 0 or 180? (Check this!)
Yaw# = EntityYaw#(Entity)
; Add Yaw, which is 0 or 180 to Pitch which is 0..180, to get 0..360.
Pitch# = Pitch# + Yaw#
; Divide Pitch (0..360) by 90 (360/4) and round it down to get an integer 0..3.
Face = Floor(Pitch# / 90.0)