``````friend = self.findNearest(self.findFriends())
loop:
friendpos = friend.pos
fx = friendpos.x
fy = friendpos.y
if self.now() < 6:
self.move({'x': fx, 'y': 42})
if self.now() < 14 and self.now() > 6:
self.move({'x': fx, 'y': fy + 6})
if self.now() > 14 and self.now() < 17:
self.move({'x': fx, 'y': fy + 6})
``````

i can seem to get this right can someone please help me? my hero stops right before the end

I think you need to line up your code more. What is it saying when you run your code? Basically what error is it producing?

ok i will do that
thank you

1 Like

Have you read hints for this level? You are trying to use time as an argument. The logic should time independent. Watch for the nearest friend position only.

1 Like

@Bryukh i read the hints and i canâ€™t seem to figure out the level do you know what im doing wrong?

1 Like

All. Only `while` is correct Find the offset from the nearest friend by x and y. Then use move to that friend position with those offsets.

1 Like

was i supposed to beat it with a simple move code?

You can solve it many ways, however â€śmove tacticâ€ť is the simplest one. You can solve it just with one line in while-loop.

1 Like

yes that is exactly what i did then i created a javascript account

1 Like

Well done for completing the level, but please could you not post working code. It ruins it for others.
So could you delete it (edit your post and delete the part with the code) and thank you for giving the advice, you can keep that part. Itâ€™s just that itâ€™s better to help people understand without telling them the answer.
Thanks
Danny