Why are loops and the attack command not working?

As for loops, seems like they got broken somehow)