Chaise Larmand
Chaise Larmand

Reputation: 1

Pygame, I can't make the quit command work

def closeWindow():
    for ev in pygame.event.get():
        if ev.type == pygame.QUIT():
            isRunning = False

when ever I call this I just get a TypeError: 'int' object is not callable. Anyone got any tips for me??

Upvotes: 0

Views: 87

Answers (1)

skrx
skrx

Reputation: 20438

Change pygame.QUIT() to pygame.QUIT. pygame.QUIT is actually just an integer (12) and it doesn't make sense to call it like a function: 12().

Upvotes: 1

Related Questions