Python Forum
[PyGame] Int object not callable error!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Int object not callable error!
#1
import pygame
pygame.init()

gameDisplay = pygame.display.set_mode((800,600))
pygame.display.set_caption("Simple dodging game")
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)

pygame.quit()
quit()
Error:
if event.type == pygame.QUIT(): #If player wants to quit the game TypeError: 'int' object is not callable
I'm not for sure what this means. Anything advice helps :)
Reply


Messages In This Thread
Int object not callable error! - by ghost0fkarma - Nov-14-2018, 02:52 AM
RE: Int object not callable error! - by metulburr - Nov-14-2018, 02:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  'module' object is not callable lilCasio 2 9,623 Apr-20-2017, 02:31 AM
Last Post: Low_Ki_

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020