簡體   English   中英

Pygame 錯誤:'int' object 不可調用

[英]Pygame error: 'int' object is not callable

import pygame

pygame.init()
screen = pygame.display.set_mode((800, 600))
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT(): 
            running = False

執行此代碼時,我收到以下錯誤:

'int' object is not callable

pygame.QUITint而不是 function。 嘗試刪除括號:

if event.type == pygame.QUIT:
    running = False

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM