当我运行此代码时:
SURFACER = SURFACEFONT.get_rect()
SURFACER.center(400, (ipnum*100))
我收到此错误:
File "index.py", line 62, in <module>
myFunction()
File "index.py", line 55, in drawGamesToScreen
SURFACER.center(400, ipnum*100)
TypeError: 'tuple' object is not callable
答案 0 :(得分:2)
center
实例上的 Rect
会返回一个元组,因此您无法在此处使用.center(x,y)
。就像这样一个新的元组:
SURFACER.center = (400, (ipnum*100))