0

When I run this code:

def showStartScreen(self):
    titleFont = pygame.font.Font("freesansbold.ttf", 100)
    titleSurf1 = titleFont.render("Pong!", True, WHITE, LIGHT_BLUE)
    titleSurf2 = titleFont.render("Pong!", True, LAVENDER)

    degrees1 = 0
    degrees2 = 0
    while True:
        DISPLAYSURF.fill(WHITE)
        rotatedSurf1 = pygame.transform.rotate(titleSurf1, degrees1)
        rotatedRect1 = rotatedSurf1.get_rect()
        rotatedRect1.center = (WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2)
        DISPLAYSURF.blit(rotatedSurf1, rotatedRect1)

        rotatedSurf2 = pygame.transform.rotate(titleSurf2, degrees2)
        rotatedRect2 = rotatedSurf2.get_rect()
        rotatedRect2.center = (WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2)
        DISPLAYSURF.blit(rotatedSurf2, rotatedRect2)

I get the error message:

DISPLAYSURF.fill(WHITE) pygame.error: display Surface quit

user2309523049
  • 7
  • 1
  • 1
  • 4
  • always add full error message (traceback) - there can be more useful info. – furas Nov 18 '17 at 04:23
  • Did you call `pygame.quit()` anywhere? An [mcve](https://stackoverflow.com/help/mcve) would be helpful. – skrx Nov 18 '17 at 06:09

0 Answers0