# Can you guys help me with Siege of Stonehold

**URL:** <https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891>\
**Category:** Uncategorized\
**Created:** [September 10, 2015, 6:09pm UTC](https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891 "2015-09-10T18:09:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caleb\_Bateman](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@Caleb\_Bateman](https://discourse.codecombat.com/u/Caleb_Bateman)\
**Post date:** [September 10, 2015, 6:09pm UTC](https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891/1 "2015-09-10T18:09:50Z")

</div>

i need help with it because i cant move at all

---

<div class="post-metadata">

**Author:** ![GundericusTheMighty](https://avatars.discourse-cdn.com/v4/letter/g/bbce88/32.png) [@GundericusTheMighty](https://discourse.codecombat.com/u/GundericusTheMighty)\
**Post date:** [September 10, 2015, 10:23pm UTC](https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891/2 "2015-09-10T22:23:06Z")

</div>

Could you post your code and give us more details?

---

<div class="post-metadata">

**Author:** ![Caleb\_Bateman](https://avatars.discourse-cdn.com/v4/letter/c/f04885/32.png) [@Caleb\_Bateman](https://discourse.codecombat.com/u/Caleb_Bateman)\
**Post date:** [October 5, 2015, 11:20pm UTC](https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891/3 "2015-10-05T23:20:44Z")

</div>

enemy = self.findNearestEnemy()  
greenflag = self.findFlag(“green”)  
if enemy:  
distance = self.distanceTo(enemy)  
loop:  
if enemy:  
self.distanceTo(enemy)  
if distance \< 5:  
self.isReady(“cleave”)  
self.attack(enemy)  
self.attack(enemy)  
self.cleave(enemy)  
if greenflag:  
self.pickUpFlag(greenflag)

---

<div class="post-metadata">

**Author:** ![ChronistGilver](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/chronistgilver/32/3778_2.png) [@ChronistGilver](https://discourse.codecombat.com/u/ChronistGilver)\
**Post date:** [October 5, 2015, 11:50pm UTC](https://discourse.codecombat.com/t/can-you-guys-help-me-with-siege-of-stonehold/4891/4 "2015-10-05T23:50:33Z")

</div>

Please format you code according to the FAQ\>.

move all your variables inside the loop. Without them, you hero stores only the first enemy and/or none at all.
