By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

How do I solve this pygame error?

P: 1
I got: “pygame.error: video system not initialized”. It was in line 29 aka the last line.

Expand|Select|Wrap|Line Numbers
  1. import pygame
  2.  
  3. pygame.init()
  4.  
  5. pygame.display.set_mode((1280, 960))
  6. pygame.display.set_caption(“MultiverseTale”)
  7.  
  8. font = pygame.font.SysFont(‘Ink Free Regular’, 36)
  9.  
  10. run = True
  11.  
  12. while run == True:
  13.     for event in pygame.event.get():
  14.         if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP:
  15.             if event.key and pygame.K_x and event.mod and pygame.KMOD_LSHIFT:
  16.                 run = False
  17.                 pass
  18.  
  19. if run == False:
  20.     pygame.display.quit()
  21.     pass
  22.  
  23. def menuScreen():
  24.     while run == True:
  25.         pygame.Surface.fill(77, 77, 77)
  26.         font.render(“Multiplayer”, 1(0, 0, 0))
  27.         pass
  28.  
  29. menuScreen()
  30. pygame.display.update
2 Weeks Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.