[SOLVED] Helpwith spring thunder

image

while True:
    item = hero.findNearestItem()
    if item.type == "coin" and item.value == 2:
        hero.moveXY(item.pos.x, item.pos.y)
        
    else:item.type == "gem.item.value == 10"
    hero.moveXyitem.pos.x, item.pos.y)

error on line 7
image
come and here please @abc @cheddarcheese

dude I am javascript remember

1 Like

here is my new and improved code

while True:
    item = hero.findNearestItem()
    if item.type == "coin" and item.value == 2:
        hero.moveXY(item.pos.x, item.pos.y)
        
    else:item.type == "gem.item.value == 10"
    hero.moveXY(item.pos.x, item.pos.y)

should i use my pet

The second quotation marks should be after gem and before item.value. There should also be an and before item.value and after gem.

this is what i have now

while True:
    item = hero.findNearestItem()
    if item.type == "coin" and item.value == 2:
        hero.moveXY(item.pos.x, item.pos.y)
        
    else:item.type == gem "item.value == 10"
    hero.moveXY(item.pos.x, item.pos.y)

@abc i keep on dieing

nevermind i solved it

2 Likes

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