How do I get rid of this overlay error?

In my experience looping only works with THEN commands, not AND