# \[SOLVED\]Need help with Shine Getter (Python)

**URL:** <https://discourse.codecombat.com/t/solved-need-help-with-shine-getter-python/20915>\
**Category:** Level Help\
**Created:** [April 10, 2020, 3:19pm UTC](https://discourse.codecombat.com/t/solved-need-help-with-shine-getter-python/20915 "2020-04-10T15:19:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coleely](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/coleely/32/11830_2.png) [@coleely](https://discourse.codecombat.com/u/coleely)\
**Post date:** [April 10, 2020, 3:19pm UTC](https://discourse.codecombat.com/t/solved-need-help-with-shine-getter-python/20915/1 "2020-04-10T15:19:39Z")

</div>

I’ve been stuck on this level for a while now, and have been reading some posts on it and have gotten my code to where my character will collect three gold coins and then stop moving. No idea why this is happening so some help would be appreciated.  
This is my code:

```python
coinIndex = 0
while True:
    coins = hero.findItems()
    while len(coins) > coinIndex:
        coin = coins[coinIndex]
        coinIndex += 1
        if coin.value == 3:
            pos = coin.pos
            x = pos.x
            y = pos.y
            hero.moveXY(x, y)
            pass

```

---

<div class="post-metadata">

**Author:** ![dedreous](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/dedreous/32/13849_2.png) [@dedreous](https://discourse.codecombat.com/u/dedreous)\
**Post date:** [April 10, 2020, 3:51pm UTC](https://discourse.codecombat.com/t/solved-need-help-with-shine-getter-python/20915/2 "2020-04-10T15:51:50Z")

</div>

Try moving your coinIndex = 0 statement to inside the while true loop.

---

<div class="post-metadata">

**Author:** ![coleely](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/coleely/32/11830_2.png) [@coleely](https://discourse.codecombat.com/u/coleely)\
**Post date:** [April 10, 2020, 4:23pm UTC](https://discourse.codecombat.com/t/solved-need-help-with-shine-getter-python/20915/3 "2020-04-10T16:23:33Z")

</div>

Tried it and it worked!  
Thanks so much!
