# \[SOLVED\]Noble Sacrifice( Stuck on Level )

**URL:** <https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974>\
**Category:** Level Help\
**Created:** [January 24, 2021, 9:52pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974 "2021-01-24T21:52:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Captain1](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@Captain1](https://discourse.codecombat.com/u/Captain1)\
**Post date:** [January 24, 2021, 9:52pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/1 "2021-01-24T21:52:15Z")

</div>

Hi everyone! I am currently stuck on the Noble Sacrifice level. I would like some help with this. When I run my code, only one of the soldiers moves to the point (90,52) while the others don’t move at all. I posted the code below. Also, I am really new to this, so I’m sorry if I did anything confusing or wrong! Thanks for your help!

```python
# Collect 80 gold
while hero.gold <= 80:
    coin = hero.findNearestItem()
    if coin:
        hero.move(coin.pos)
soldiers = 0
while soldiers < 4:
    if hero.gold >= hero.costOf("soldier"):
        hero.summon("soldier")
        soldiers += 1
# Send your soldiers into position
points = []
points[0] = { "x": 13, "y": 73 }
points[1] = { "x": 51, "y": 73 }
points[2] = { "x": 51, "y": 53 }
points[3] = { "x": 90, "y": 52 }
friends = hero.findFriends()

# Use range to make an array to loop over.
while True:
    for j in range(len(friends)):
        point = points[j]
        friend = friends[j]
    if friend:
        hero.command(friend, "move", points)

```

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 24, 2021, 9:52pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/2 "2021-01-24T21:52:52Z")

</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:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 24, 2021, 9:53pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/3 "2021-01-24T21:53:26Z")

</div>

Delete the while-True-Loop otherwise you are good to go 👍

---

<div class="post-metadata">

**Author:** ![Captain1](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@Captain1](https://discourse.codecombat.com/u/Captain1)\
**Post date:** [January 24, 2021, 9:56pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/4 "2021-01-24T21:56:42Z")

</div>

Oh, I didn’t see that, thanks for your help!

---

<div class="post-metadata">

**Author:** ![milton.jinich](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/milton.jinich/32/21419_2.png) [@milton.jinich](https://discourse.codecombat.com/u/milton.jinich)\
**Post date:** [January 24, 2021, 9:57pm UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/5 "2021-01-24T21:57:32Z")

</div>

When someone solves your problem click the little checkmark next to the post that helped you. Good Luck.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a9445509d1a758c41b5ddcddc8c8e20a5dedb67f.png) [@system](https://discourse.codecombat.com/u/system)\
**Post date:** [January 25, 2021, 9:58am UTC](https://discourse.codecombat.com/t/solved-noble-sacrifice-stuck-on-level/26974/6 "2021-01-25T09:58:11Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
