when i ran the code below i got this error:
File "e:\pranil\python\doing shit with python\automating dino game.py", line 12, in if auto.pixelMatchesColor(i,j, (83, 83, 83)): File "C:\Users\Pranil.DESKTOP-TLQKP4G.000\AppData\Local\Programs\Python\Python38\lib\site-packages\pyscreeze__init__.py", line 559, in pixelMatchesColor pix = pixel(x, y) File "C:\Users\Pranil.DESKTOP-TLQKP4G.000\AppData\Local\Programs\Python\Python38\lib\site-packages\pyscreeze__init__.py", line 584, in pixel return (r, g, b) File "C:\Users\Pranil.DESKTOP-TLQKP4G.000\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 120, in exit next(self.gen) File "C:\Users\Pranil.DESKTOP-TLQKP4G.000\AppData\Local\Programs\Python\Python38\lib\site-packages\pyscreeze__init__.py", line 113, in __win32_openDC raise WindowsError("windll.user32.ReleaseDC failed : return 0") OSError: windll.user32.ReleaseDC failed : return 0
import pyautogui as auto
from PIL import Image, ImageColor
import time
import keyboard
auto.FAILSAFE = False
time.sleep(2)
# print(auto.position())
while True:
sshot = auto.screenshot()
for j in range(510, 514):
for i in range(316, 350):
if auto.pixelMatchesColor(i,j, (83, 83, 83)):
auto.press('up')
if keyboard.is_pressed('q'):
break