Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Copper Meadows it might be very simple

# Collect all the coins in each meadow.
# Use flags to move between meadows.
# Press Submit when you are ready to place flags.

while True:
    flag = hero.findFlag("green")
    if flag:
        pass  # `pass` is a placeholder, it has no effect.
        # Pick up the flag.
        # Automatically move to the nearest item you see.
        hero.moveXY(flag.pos.x, flag.pos.y)

Cannot read property ‘pos’ of null.

hero.moveXY(flag.pos.x, flag.pos.y)

I don’t understand “Cannot read property ‘pos’ of null.”? What does this mean when it says “Cannot read property ‘pos’ of null.”??

Why are you use moveXY?
Just do hero.pickUp(flag).

thx RangerGrant9307

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.