You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using code as is had "pygame.error: video system not initialized" upon window close
Pygame tutorial website says to add (before line 3):
pygame.init()
So that all modules are initialed... May or not be an issue.
in main() after one detects exit event, for loop is left to keep looking for events even though pygame.quit() is called, thus after line with pygame.quit() add:
sys.exit()
and perhaps import sys module in first line.
Summary of changes:
add "sys, " in front of "pygame" line 1
insert before line 3 "pygame.init()"
in main() for loop, after line with "pygame.quit()", add line with "sys.exit()" to not only break for loop and main but exit and not use anything in pygame modules, etc.
The text was updated successfully, but these errors were encountered:
Using code as is had "pygame.error: video system not initialized" upon window close
Pygame tutorial website says to add (before line 3):
pygame.init()
So that all modules are initialed... May or not be an issue.
in main() after one detects exit event, for loop is left to keep looking for events even though pygame.quit() is called, thus after line with pygame.quit() add:
sys.exit()
and perhaps import sys module in first line.
Summary of changes:
The text was updated successfully, but these errors were encountered: