I always try to solve all by myself but I am really struggling with this one: I really do not see why the error occurs. Here the code:
loop:
items=self.findItems()
itemsIndex=0
if items:
while self.gold < 20:
item=items[itemsIndex]
if item:
self.moveXY(item.pos.x, item.pos.y)
itemsIndex += 1
if self.gold >= 20:
count=1
if count == 1:
self.moveXY(83, 78)
count =2
else if count == 2:
mself.moveXY(84, 51)
count =3
else if count ==3:
self.moveXY(84, 22)
count = 0
Thanks in advace!