0
我想在pygame上運行一些教程代碼。但是,當pygame.update我得到錯誤:,沒有別的只是錯誤:然後python退出。pygame在致電更新時出現錯誤
import pygame
pygame.init()
gameDisplay=pygame.display.set_caption('test')
clock=pygame.time.Clock()
crashed= False
while not crashed:
for event in pygame.event.get():
if event.type == pygame.QUIT:
crashed = True
print(event)
pygame.display.update()
clock.tick(60)
我確實包含了錯誤信息,它是文字'錯誤:',並且回溯只顯示了---> 15 pygame.display.update(),並且在代碼之前有幾行。 –