[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] [PYGAME] Noob Help.
>>
>> But it doesn't work.
>>
>
> Never say these words as your only explanation when you post code.
>
> Say "But when I try running it, I get an error message that says
> blahblahblah and I don't understand what that means"
>
> or "But when I try to run it (detailed description) happens"
>
> or "but when I try to run it absolutely nothing happens. How do i et
> more information about what went wrong?"
>
Alright I tried fixing the error so I typed this in notepad:
import sys, pygame
pygame.init()
size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0
screen = pygame.display.set_mode(size)
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
screen.fill(black)
pygame.display.flip()
Alright so when I run the "game.py" the console says error syntax then I
can't read the rest because the console window closes automatically. I
have the slightest idea on whats wrong.