[SOLVED] Cloudrip Commander need help

soldiers do not move

# Summon some soldiers, then direct them to your base.

# Each soldier costs 20 gold.
while hero.gold > hero.costOf("soldier"):
soldiers = hero.findFriends()
soldierIndex = 0
# Add a while loop to command all the soldiers.
while soldierIndex == len(soldiers):
    soldier = soldiers[soldierIndex]
    hero.command(soldier, "move", {"x": 50, "y": 40})
    soldierIndex += 1
# Go join your comrades!
hero.moveXY(50, 40)

Think about this line:

It is saying "while the counter is the same as the length of ‘soldiers’…you want to use a different comparative operator instead.


Thanks!!(20 characters)

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