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

[SOLVED] Second Gem problem

I believe my code is good, but for some reason after the first gem is picked up no more gems appear. this is my code–

while True:
    items = hero.findItems()
    # If the length of items is greater or equal to 2:
    if len(items) >= 2:
        # Move to the second item in items
        hero.moveXY(items[1].pos.x,items[1].pos.y)
    # Else:
    else:
        # Move to the center mark.
        hero.moveXY(40,35)

Never mind. The problem was my hero.moveXY(40,35) was off by one increment, the correct number was (40,34).