Comments (7)
You need to call your init() function.
from pygame.
You need to call your init() function.
How do I do that?😂
from pygame.
After this line
if name == 'main':
from pygame.
if __name__ == '__main__':
init()
while True:
main()
I did this and I'm still getting this error:
line 5, in init
win = pygamedisplay.set_mode((100,100))
^^^^^^^^^^^^^
NameError: name 'pygamedisplay' is not defined
line 26, in
init()
from pygame.
You forgot a .
from pygame.
i put the .
def init():
pygame.init()
win = pygame.display.set_mode((100,100))
but im still getting this error:
line 26, in
init()
line 5, in init
win = pygame.display.set_mode((100,100))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pygame.error: No available displays
Im sorry if the mistake in the code seems obvious im very new to coding
from pygame.
i have changed different other parts of the code but I am still getting the above error. does anyone know why?
from pygame.
Related Issues (20)
- Inconsistent resize behavior w.r.t. pygame.SCALED
- Test failures against NumPy 2.0.0rc2 HOT 9
- Improve Pygame Installation Instructions
- Improve Pygame Installation Instructions
- Flicker Screen
- Mouse cannot focus on vscode when breakpoint on Ubuntu when mouse pressed HOT 1
- Juego autista
- pygame not responding HOT 2
- python setup.py build works but not python -m build --wheel HOT 2
- click on pygame windows result in not responding and crash
- AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
- game HOT 5
- Lot HOT 1
- Chess
- gmae
- game
- learn
- Add built-in button / map & character designer
- game
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygame.