def bisefs(self,loadjietu,mubiao,suku,wucha): jjieguo=0 for sekus in suku: yanse=sekus[2] red = int(yanse[4:6], 16) green = int(yanse[2:4], 16) blue = int(yanse[0:2], 16) #RGBneirongzhi=(red,green,blue) xxx=int(sekus[0]) yyy=int(sekus[1]) yuanse=loadjietu.getpixel((int(sekus[0]),int(sekus[1]))) #RGByuanse = (yuanse[2], yuanse[1], yuanse[0]) secha = math.sqrt((red-yuanse[2])**2 + (green-yuanse[1])**2 + (blue-yuanse[0])**2) if secha <= wucha: jjieguo=jjieguo+1 if jjieguo==len(suku): return True,xxx,yyy else: return False if ff.bisefs(jietu,'福利大厅',seku.color_M['游戏登陆界面']['界面标识']['福利大厅'],0): error=0 return "福利大厅界面" 纠错
时间: 2024-03-23 12:36:48 浏览: 166
这段代码中出现了一个错误,函数 `bisefs` 最后的 `if` 判断语句没有对齐。正确的代码应该是:
```
def bisefs(self, loadjietu, mubiao, suku, wucha):
jjieguo = 0
for sekus in suku:
yanse = sekus[2]
red = int(yanse[4:6], 16)
green = int(yanse[2:4], 16)
blue = int(yanse[0:2], 16)
xxx = int(sekus[0])
yyy = int(sekus[1])
yuanse = loadjietu.getpixel((int(sekus[0]), int(sekus[1])))
secha = math.sqrt((red - yuanse[2])**2 + (green - yuanse[1])**2 + (blue - yuanse[0])**2)
if secha <= wucha:
jjieguo = jjieguo + 1
if jjieguo == len(suku):
return True, xxx, yyy
else:
return False
if ff.bisefs(jietu, '福利大厅', seku.color_M['游戏登陆界面']['界面标识']['福利大厅'], 0):
error = 0
return "福利大厅界面"
```
阅读全文