Hunting Party help (python)

I am kinda stuck on the level Hunting Party. Here is my code:

# You can use findNearestEnemy() on your soldiers to get their nearest enemy instead of yours.
while True:
    friends = hero.findFriends()
    # Use for-loop and for each friend:
    for friend in friends:
        # If they see an enemy then command to attack.
        enemy = friend.findNearestEnemy()
        if enemy:
            hero.command(friend, "attack", enemy)
        # Command to move east by small steps.
        else:
            hero.command(friend, "move", {'x' friend.pos.x + 1, 'y' = friend.pos.y})

This is what I am confused about.
image
The error isn’t for any specific line, it’s just there, and I don’t know what it means. Please help.

A set is a bit like an array, it’s referring to the section where you tell your friend where to go. After the ‘x’ and the ‘y’ you need a : and you need to remove the =.
Danny

2 Likes