Прошу помочь, уровень "Ущелье стального когтя"

defendPoints = [{"x": 35, "y": 63},{"x": 61, "y": 63},{"x": 32, "y": 26},{"x": 64, "y": 26}]

summonTypes = ["soldier","soldier","soldier","soldier","archer","archer","archer","archer"]


def summonTroops():
    type = summonTypes[len(hero.built) % len(summonTypes)]
    if hero.gold >= hero.costOf(type):
        hero.summon(type)

def commandTroops():
    friends = hero.findFriends()
    for i in range(len(friends)):
        defendPoints = [{"x": 35, "y": 63},{"x": 61, "y": 63},{"x": 32, "y": 26},{"x": 64, "y": 26}]
        friend = friends[i]
        friendIndex = 0
        # Прикажи своим подчинённым защищать `defendPoint`
        item = hero.findNearestItem()
        hero.command(friend, "defend", defendlength)
 

while True:
    summonTroops()
    commandTroops()

Пожалуйста, отформатируйте свой код в соответствии с FAQ.

make sure that you put your code in ``` look in the posters FAG

https://discourse.codecombat.com/faq

Ответе пажалуста :no_mouth: