Jun-06-2023, 06:21 PM
(This post was last modified: Jun-08-2023, 11:24 AM by deanhystad.)
I am watching and copying the methods of how to make a game on Pygame via the video "Pygame in 90 Minutes - For Beginners" by Tech with Tim.
I wrote this code in idel
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
Based on his work it should have opened up a blank window.
I got an invalid syntax message instead.
I am wondering what went wrong,
Thank you.
I wrote this code in idel
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
>>> import pygame pygame 2.4 . 0 (SDL 2.26 . 4 , Python 3.11 . 3 ) Hello from the pygame community. https: / / www.pygame.org / contribute.html WIDTH, HEIGHT = 900 , 500 WIN = pygame.display.set_mode((WIDTH, HEIGHT)) def main(): run = True while run: for event in pygame.event.get(): if event. type = = pygame.QUIT: run = False pygame.quit() if _name_ = = "_main_" : Main() |
I got an invalid syntax message instead.
I am wondering what went wrong,
Thank you.
buran write Jun-07-2023, 09:45 AM:
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.