Noble Sacrifice Error

For the level Noble sacrifice, I used the code listed below. It gave me the error message “TypeError: Tried to load an unsafe native value into the interperter:object / Marie” Is something wrong with my code or is it a bug?
Code:

# Collect 80 gold
while hero.gold<80:
    item=hero.findNearestItem()
    hero.moveXY(item.pos.x, item.pos.y)
# Build 4 soldiers to use as bait
hero.summon("soldier")
hero.summon("soldier")
hero.summon("soldier")
hero.summon("soldier")
# Send your soldiers into position
points = []
points[0] = { "x": 13, "y": 73 }
points[1] = { "x": 51, "y": 73 }
points[2] = { "x": 51, "y": 53 }
points[3] = { "x": 90, "y": 52 }
friends = hero.findFriends()

# Use range to make an array to loop over.
# Match the friends to the points and command them to move
for i in friends:
    hero.command(hero.findNearest(friends), "move", points[i])
1 Like

“for i in friends:”

This will define i as a unit.

However, within the for loop, you attempted to use it as a number when you called points[i]

1 Like