Cloudrip Commander python

Its saying fix your code line 11 try self.findfriends but i am following what it says on the item

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

#Each soldier costs 20 gold.
while > self.costOf("soldier"):
soldiers = self.findFriends() #Define these OUTSIDE the while-loop
soldierIndex = 0
#Add a while loop to command all the soldiers.
while (soldierIndex < len(soldiers)):
    #Do all your actions here
    friend = self.getNearestFriend()
    self.command(friend, 'move', self.pos)
#Go join your comrades!
  self.moveXY(50, 41)

nvm i beat it with a self.moveXY(50,40)

It could be an indentation problem. Note the two spaces before self.moveXY(50, 41) in your code.

Doesn’t work for me either,

Daniel post formated code (see forum FAQ) and the specific issue you have problems with. The code about uses:


which is not a function. Look at the available functions listed bellow your code editor

It’s hero.findNearestFriend

You are replying to someone who has not been seen on this board for over two years.