Answer the question
In order to leave comments, you need to log in
What should I do to make the error disappear?
Hello, I decided to try to make a game, I ran into errors, please help.
The code:
import pygame
from pygame import *
WIN_WIDTH = 800
WIN_HEIGHT = 640
DISPLAY = (WIN_WIDTH, WIN_HEIGHT)
BACKGROUND_COLOR = "#004400"
def main():
pygame.init()
screen = pygame.display.set_mode(DISPLAY)
pygame.display.set_caption("Game")
bg = pygame.Surface(WIN_WIDTH, WIN_HEIGHT)
bg.fill(pygame.Color(BACKGROUND_COLOR))
while 1:
for e in pygame.event.get():
if e.type in "QUIT":
raise SystemExit("QUIT")
screen.blit(bg,(0,0))
pygame.display.update()
if __name__ == "__main__":
main()
Answer the question
In order to leave comments, you need to log in
You have written everything in error. Match your OS and python \ pygame (I'm talking about bitness)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question