0

I've recently started using Pygame but I came across this error and can't seem to find a reason as to why this has happened.

My code:

import pygame
pygame.init()
screen = pygame.display.set_mode((400,500))
done = False
while not done:
    for event in pygame.event.get():
        if event.type == pygame.quit():
            done = True
    pygame.display.flip()

The error I get:

pygame.error: video system not initialized
Rabbid76
  • 202,892
  • 27
  • 131
  • 174

1 Answers1

0

You have made a small error write pygame.QUIT instead of pygame.quit(). This causes pygame to quit, so the error makes sense.

Robin Dillen
  • 704
  • 5
  • 11