# CodeCombat level - Go Fetch\[SOLVED\]

**URL:** <https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915>\
**Category:** Level Help\
**Created:** [May 14, 2021, 5:57pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915 "2021-05-14T17:57:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 5:57pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/1 "2021-05-14T17:57:09Z")

</div>

How do I get past Go Fetch in CodeCombat?! HELP!

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:05pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/2 "2021-05-14T18:05:13Z")

</div>

What is your code? (20 chars)

---

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 6:17pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/3 "2021-05-14T18:17:43Z")

</div>

My code:

```python
# You've been caught in a burl trap!
# Send your pet to fetch the health potions!

def goFetch():
    # You can use loops in a handler function.
    while True:
        potion = hero.findNearestItem()
        if potion:
            # Use pet.fetch to fetch the potion.
            pet.fetch("potion")
            pass

# When your pet is summoned, it triggers a "spawn" event.
# This tells your pet to run the goFetch function at the start of the level:
pet.on("spawn", goFetch)

```

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://discourse.codecombat.com/u/abc)\
**Post date:** [May 14, 2021, 6:32pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/4 "2021-05-14T18:32:25Z")

</div>

What is your equipment for the level? That might be why.

---

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 6:37pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/5 "2021-05-14T18:37:24Z")

</div>

Programmation II, Wooden Glasses, Sundial Wristwatch, Workers Gloves, Long Sword, Tarnished Bronze Breastplate, Bronze Shield, Leather Boots, and Cougar.

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:38pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/6 "2021-05-14T18:38:54Z")

</div>

> [@King\_RaiderVII](#):
>
> ```python
> potion = hero.findNearestItem()
> 
> ```

use:

```python
potion = pet.findNearestByType("potion")
```

---

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 6:41pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/7 "2021-05-14T18:41:30Z")

</div>

It still doesn’t work! My pet still says **"I can’t carry that!"**

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:48pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/9 "2021-05-14T18:48:02Z")

</div>

actulaly forget that

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:49pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/11 "2021-05-14T18:49:42Z")

</div>

> [@King\_RaiderVII](#):
>
> ```python
> pet.fetch("potion")
> 
> ```

Remove the brackets and you’ll be good. that’s all you need to do

---

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 6:51pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/12 "2021-05-14T18:51:04Z")

</div>

What are the brackets? These? ()

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:51pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/13 "2021-05-14T18:51:32Z")

</div>

sorry i meant the quotes

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:51pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/14 "2021-05-14T18:51:44Z")

</div>

to change it to:

```python
pet.fetch(potion)
```

---

<div class="post-metadata">

**Author:** ![King\_RaiderVII](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/king_raidervii/32/22594_2.png) [@King\_RaiderVII](https://discourse.codecombat.com/u/King_RaiderVII)\
**Post date:** [May 14, 2021, 6:53pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/15 "2021-05-14T18:53:10Z")

</div>

Thank You! It worked!

---

<div class="post-metadata">

**Author:** ![thebagel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thebagel/32/22241_2.png) [@thebagel](https://discourse.codecombat.com/u/thebagel)\
**Post date:** [May 14, 2021, 6:54pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/16 "2021-05-14T18:54:32Z")

</div>

ok! great! could you change hte title to say solved and also mark the soution box under whivhever post helped most

---

<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:** [May 17, 2021, 4:50pm UTC](https://discourse.codecombat.com/t/codecombat-level-go-fetch-solved/28915/17 "2021-05-17T16:50:37Z")

</div>

Closed on May 17, 2021, 4:50pm UTC

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