Quote:
Whats wrong with my Python code it says sleep(3) is unreachable
Because anything after a return is unreachable.
def locate_lava():
position = pt.locateCenterOnScreen('Images/lava.png', confidence=.4)
if position is None:
return False
else:
move_character('s', 2)
print('Found lava!!!')
return True
sleep(3)
nav_to_image('Images/startgame.png', 3)
You should read carefully the documentation about 'return'.