I don’t know what the following error message even means so…
And my code of course
# 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, 'x' friend.pos.y})
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})