'Python3 problem with recalling a function
i have a part of code presented below and my issue is when i try to call bet_definer(point, digit_option, bet_team, m, url)(i marked it below in code) nothing happens, but it's supposed to run bet_definer part again a few times. What do i do wrong?
def bet_definer(point, digit_option, bet_team, url, m):
for i in range(0, 10):
if re.search(r'\+', str(bet_team)):
digit_option_changed = int(digit_option) + int(i)
else:
digit_option_changed = int(digit_option) - int(i)
if digit_option_changed < 1:
print("menshe 1")
if i < 9:
if m < 4:
time.sleep(5)
m += 1
bet_definer(point, digit_option, bet_team, url, m)
else:
print("значение выросло, не подходит")
break
pyautogui.hotkey('ctrl', 'f')
pyautogui.write(str(digit_option_changed) + '.5')
time.sleep(random.random())
pyautogui.moveTo(663, 208)
time.sleep(random.random())
if pyautogui.pixelMatchesColor(663, 208, (103, 103, 103)):
if pyautogui.pixelMatchesColor(point[0], point[1], ((56, 216, 120) or (255, 255, 255))):
pyautogui.moveTo(273, 448)
time.sleep(random.random())
if pyautogui.pixelMatchesColor(301, 451, (80, 80, 80)):
time.sleep(2)
m = 0
bet_definer(point, digit_option, bet_team, url, m)
else:
pyautogui.click(x=point[0], y=point[1])
print('nashel')
match = True
match_check(point, digit_option, bet_team, match, r, url)
break
elif i == 9:
match = False
match_check(point, digit_option, bet_team, match, r, url)
else:
pyautogui.click(x=663, y=208, button='left', clicks=5, interval=0.5)
def match_check(point, digit_option, bet_team, match, r, url):
if match:
time.sleep(2)
make_bet(m, r)
else:
print('oshibka')
if r < 4:
r += 1
time.sleep(5)
print(f"ищу снова {r} раз")
bet_definer(point, digit_option, bet_team, m, url) #here is the problem
else:
print("попытки без результата")
return
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
