Yeah I always lose to him and idk what to do
sorry foe all of the questions, I don’t really understand the arena. But why does this not work???
item = hero.findNearestItem()
if len(item) > 0:
if item.y > hero.y:
hero.moveUp(1)
elif item.y < hero.y:
hero.moveDown(1)
elif hero.y == item.y:
if item.x > hero.x:
hero.moveRight(1)
if item.x < hero.x:
hero.moveLeft(1)
What does it do? Does the code just glitch out?
no it just skips past the line and does nothing. I want it to collect the items.
I haven’t submitted my code tho
Idk then cause starrydreamer is ur user right?
Yes but I haven’t submitted
Are you calling the function in a while loop?
hero.findNearestItem returns the nearest item, not a array.
Hero.findItems returns a array of every item while hero.findNearestItem returns the nearest item
It’s a bug with the if len(item)>0 part. Since it returns a single item, it’s not a array, hence len won’t work
Yeah u got me im Chiron lol
Lets gooooooooooooooooooo
Imma do this tournament later I purposely dropped my code so
Is it just me or does it rank you super slowly?
Mine does to it is really annoying when I’m trying to see if my code is good
XD. The servers are prob just using all their recources to run the final sims for King’s Gambit.