Change angle to sprite.angle or whatever name you gave the object.
Or since you are using the bullet behavior with “set angle” to no, you’d want to use the action:
“Bullet: set angle of motion” and use dop’s formula with
round(((sprite.bullet.angleOfMotion+360)%360)/45)*45