我只是在pygame中進行一些開發,我遇到了一些非常奇怪的麻煩。這是我的代碼:Pygame遊戲循環語法錯誤
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()
我在說
for event in pygame.event.get():
^
是一個語法錯誤,即使它不是,幫助線18得到一個無效的語法錯誤?
感謝這麼多,現在我感覺真的很愚蠢:P –
@NicholasWright哈,別 - 如果我說我會說謊從來沒有被絆倒:) – RocketDonkey
如果你不使用語法高亮,它有助於這樣的東西。 – ninMonkey