Installed latest versions but can't get it to work. Tried all the lint suggestions in settings in other posts. None make any difference.
Asked
Active
Viewed 56 times
0
-
What error are you getting? do you have sample code that causes the error? – Mike67 Jul 30 '20 at 18:33
-
It's there in the picture! Missing module. – Rob Jul 30 '20 at 18:36
-
1To be clear, the issue is with the VS intellisense? The code still runs correctly? – Mike67 Jul 30 '20 at 18:41
-
How can I run something that I can't find? I was going to setup a display window with screen = pygame.display.set_mode(800,600). I can't even do pygame.init() because that's not there either. – Rob Jul 30 '20 at 18:46
-
1Open a cmd window and run `python MyScript.py` (or whatever your file name is) and see if there's an error. – Mike67 Jul 30 '20 at 19:05
-
says no such file or directory...but I have the path set...and set it during setup.. do I have to be in the same directory? – Rob Jul 30 '20 at 19:10
-
1Ok...so I did what you said from the directory where I created the scripts and got this: pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "snake.py", line 5, in
screen = pygame.display.set_mode(800,600) TypeError: argument 1 must be 2-item sequence, not int – Rob Jul 30 '20 at 19:13 -
Good. It's just an intellisense issue with VS. Python as working. For the error you need to change that line to `screen = pygame.display.set_mode((800,600))` – Mike67 Jul 30 '20 at 19:23
-
Aha!!! Ok. I put the extra brackets in and it runs from the command line and in VS Code. Any ideas how to get intellisense working? – Rob Jul 30 '20 at 19:25