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.