# Why are loops and the attack command not working?

**URL:** <https://discourse.codecombat.com/t/why-are-loops-and-the-attack-command-not-working/15131>\
**Category:** Uncategorized\
**Created:** [July 8, 2018, 4:03pm UTC](https://discourse.codecombat.com/t/why-are-loops-and-the-attack-command-not-working/15131 "2018-07-08T16:03:36Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/nick/32/784_2.png) [@nick](https://discourse.codecombat.com/u/nick)\
**Post date:** [July 10, 2018, 3:16pm UTC](https://discourse.codecombat.com/t/why-are-loops-and-the-attack-command-not-working/15131/12 "2018-07-10T15:16:34Z")

</div>

Use `while True:` instead of `loop:` now. `loop:` was an old CodeCombat-specific syntax construct we put in back when our transpiler required a workaround to make your code not infinitely loop when your loop was empty, but now we can do that inside the normal Python `while True:` loop, and recently I removed support for `loop:` (from which we had switched away in our sample code years ago).

---

_[View the full topic](https://discourse.codecombat.com/t/why-are-loops-and-the-attack-command-not-working/15131)._
