Reputation: 21
I'm just doing some development in pygame and I've run into some very strange trouble. This is my code:
import pygame, sys
from pygame.locals import *
#Declarin some variables
WINHEIGHT = 320
WINWIDTH = 640
red = (255, 0, 0)
pygame.init()
DISPLAY = pygame.display.set_mode((WINWIDTH, WINHEIGHT))
pygame.display.set_caption('My First PyGame')
FONT = pygame.font.Font(None, 32)
while True:
pygame.draw.circle(DISPLAY, red, (100, 100)
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
I get an invalid syntax error on line 18 saying that
for event in pygame.event.get():
^
Is a syntax error even though it isn't, help?
Upvotes: 2
Views: 223
Reputation:
You missed a )
in
Just put that
(pygame.draw.circle(DISPLAY, red, (100, 100) # here!
Upvotes: 1
Reputation: 37269
Note the line above:
pygame.draw.circle(DISPLAY, red, (100, 100)
You are missing a parenthesis:
pygame.draw.circle(DISPLAY, red, (100, 100))
Upvotes: 3