# Sarven-sentry help

**URL:** <https://discourse.codecombat.com/t/sarven-sentry-help/29412>\
**Category:** Level Help\
**Created:** [June 22, 2021, 3:24pm UTC](https://discourse.codecombat.com/t/sarven-sentry-help/29412 "2021-06-22T15:24:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamiru](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/kamiru/32/22983_2.png) [@Kamiru](https://discourse.codecombat.com/u/Kamiru)\
**Post date:** [June 22, 2021, 3:24pm UTC](https://discourse.codecombat.com/t/sarven-sentry-help/29412/1 "2021-06-22T15:24:41Z")

</div>

My hero doesn’t find any flag…

```python
while True:
    flagGreen = hero.findFlag("green")
    flagBlack = hero.findFlag("black")

    if flagGreen:
        # Build a "fence" at flagGreen's position.
        hero.buildXY("fence", flagGreen.pos.x, flagGreen.pos.y)
        hero.pickUpFlag(flagGreen)

    if flagBlack:
        # Build a "fire-trap" at flagBlack's position.
        hero.buildXY("fire-trap", flagBlack.pos.x, flagBlack.pos.y)
        hero.pickUpFlag(flagBlack)

    hero.moveXY(43, 31)

```

---

<div class="post-metadata">

**Author:** ![The\_legendary\_pro19](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/the_legendary_pro19/32/31950_2.png) [@The\_legendary\_pro19](https://discourse.codecombat.com/u/The_legendary_pro19)\
**Post date:** [June 22, 2021, 7:15pm UTC](https://discourse.codecombat.com/t/sarven-sentry-help/29412/2 "2021-06-22T19:15:17Z")

</div>

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review [this topic](https://discourse.codecombat.com/t/welcome-to-codecombat-discourse-forums/15601), which shows all essentials of this board! Thanks!

---

<div class="post-metadata">

**Author:** ![Chaboi\_3000](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/chaboi_3000/32/48486_2.png) [@Chaboi\_3000](https://discourse.codecombat.com/u/Chaboi_3000)\
**Post date:** [June 22, 2021, 11:13pm UTC](https://discourse.codecombat.com/t/sarven-sentry-help/29412/3 "2021-06-22T23:13:05Z")

</div>

Your code works fine for me. Are you actually placing the flags where they tell you to?

---

<div class="post-metadata">

**Author:** ![enPointe77](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/enpointe77/32/43632_2.png) [@enPointe77](https://discourse.codecombat.com/u/enPointe77)\
**Post date:** [June 23, 2021, 4:50am UTC](https://discourse.codecombat.com/t/sarven-sentry-help/29412/4 "2021-06-23T04:50:00Z")

</div>

And you do realize that you have to submit it in order to use flags?
