when my hero tries to command my soldier
he just stands freezes and i get an error
# Collect gold.
item = hero.findNearestItem()
# If you have enough gold, summon a soldier.
if hero.gold > hero.costOf("soldier"):
# Use a for-loop to command each soldier.
for friend in hero.findFriends():
if friend.type == "soldier":
enemy = friend.findNearestEnemy()
hero.command(friend, "move", (47, 52)
# If there's an enemy, command her to attack.
hero.command(friend, "attack", enemy)
elif soldier.health < 100:
# Careful! If your soldiers are defeated, a warlock will appear!
# Otherwise, move her to the right side of the map.
can you guys help me find out what the problem is
and how to command my soldiers
cause i havent played in a while so i forgot a bit