Reputation: 21
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
When executing this code, I get the following error:
'int' object is not callable
Upvotes: 1
Views: 101
Reputation: 353
pygame.QUIT
is an int
and not a function. Try removing the parentheses:
if event.type == pygame.QUIT:
running = False
Upvotes: 1