PYTHON cannot identify the error in the code

Asked

Viewed 53 times

-1

import pyautogui

life50 = pyautogui.pixelMatchesColor(663, 306, (25, 195, 25))

if: life50 
    pyautogui.press('f1')
else: 
    pyautogui.screenshot('C:/Users/ANDRE/Desktop/Imagens')

I am learning to code in python and the above code is not working and I can not identify the error, someone can help me?

1 answer

1

You used the : in the wrong place. Make the change that Paulo Marques suggested, change

if: life50 

for

if life50: 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.