# Clouddrip Mountain-Timber Guard

**URL:** <https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358>\
**Category:** Level Help\
**Created:** [February 23, 2020, 10:26am UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358 "2020-02-23T10:26:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noob\_Newbie](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@Noob\_Newbie](https://discourse.codecombat.com/u/Noob_Newbie)\
**Post date:** [February 23, 2020, 10:26am UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358/1 "2020-02-23T10:26:53Z")

</div>

I looked at other’s codes and this should work, yet it kept saying I can’t command troops to go that coordinate

code:

while True:  
# Collect gold.  
item = hero.findNearestItem()  
if item:  
hero.move(item.pos)  
# If you have enough gold, summon a soldier.  
if hero.gold \> hero.costOf(“soldier”):  
hero.summon(“soldier”)  
# Use a for-loop to command each soldier.  
# For loops have two parts: “for X in Y”  
# Y is the array to loop over.  
# The loop will run once for each item in Y, with X set to the current item.  
for friend in hero.findFriends():  
if friend.type == “soldier”:  
enemy = friend.findNearestEnemy()  
# If there’s an enemy, command her to attack.  
if enemy:  
hero.command(friend, “attack”, enemy)  
# Otherwise, move her to the right side of the map.  
else:  
hero.command(friend, “move”, _ **84, 45** _)

The duck said the place with \*\*\* should have type object, but got number.

---

<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:** [February 23, 2020, 6:35pm UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358/2 "2020-02-23T18:35:41Z")

</div>

Howdy and welcome to the forum. Please post you code properly formatted…you can learn how here: [[Essentials] How To Post/Format Your Code Correctly](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521)

That being said, the problem looks to be with your final .command statement. If you read the resulting error message closely, it pretty much tells you how to fix it:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/d/db6a8894475fe9116d0f7c1e27732815bb77c0f1.png)

---

<div class="post-metadata">

**Author:** ![Noob\_Newbie](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@Noob\_Newbie](https://discourse.codecombat.com/u/Noob_Newbie)\
**Post date:** [February 24, 2020, 3:32am UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358/3 "2020-02-24T03:32:49Z")

</div>

like this?

hero.command(friend, “move”, {84, 45})

---

<div class="post-metadata">

**Author:** ![Noob\_Newbie](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@Noob\_Newbie](https://discourse.codecombat.com/u/Noob_Newbie)\
**Post date:** [February 24, 2020, 3:33am UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358/4 "2020-02-24T03:33:51Z")

</div>

the duck then said "don’t know how to transform: Set "

---

<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:** [February 24, 2020, 12:10pm UTC](https://discourse.codecombat.com/t/clouddrip-mountain-timber-guard/20358/5 "2020-02-24T12:10:46Z")

</div>

try {“x”: 84, “y”: 45} instead
