I am currently stuck on the level, keeping time. Here is my code
loop:
nearest = self.findNearest(self.findEnemies())
# If it’s the first 10 seconds, fight.
if self.now() < 10:
self.attack(nearest)
pass
# Else, if it’s the first 30 seconds, collect coins.
elif self.now() < 30:
item = self.findItems()
self.moveXY(item.pos.x , item.pos.y)
pass
# After 30 seconds, join the raid!
else:
self.attack(nearest)
pass
On the collecting coin part, I keep getting a debug message that says,"pos was null. use a null check before accessing properties. Can somebody please help?
