Jump to content
  • Advertisement
Sign in to follow this  
louie999

Problem with Pygame

This topic is 1327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

MZdRSts.png

Why do i get those errors? from what i've read in some Pygame tutorials:

pygame.display.set_mode()

That should have worked,but its giving me errors,can someone explain to me why i'm getting those errors, im quite new to these things sad.png

Edited by louie999

Share this post


Link to post
Share on other sites
Advertisement

I think you have missed parameters in the function.

 

setMode((widht, height), 0, bits)

 

0 is the flag, on the place bits, you can write it to be 32.

 

EDIT:

 

You should init first!

 

pygame.init()
Edited by sn0k3

Share this post


Link to post
Share on other sites

 

I think you have missed parameters in the function.

 

setMode((widht, height), 0, bits)

 

0 is the flag, on the place bits, you can write it to be 32.

 

EDIT:

 

You should init first!

pygame.init()

ydlLz0q.png

Ouch ohmy.png

Share this post


Link to post
Share on other sites

Sooooo why is that error(from my above post) happening? i put 

pygame.init()

but i still get that error? Iam completely clueless on my its still giving errors mellow.png

Share this post


Link to post
Share on other sites

By any chance do you have any file called 'pygame.py' in your python path (probably the directory from where you're launching the python interpreter)? Looks like it's not loading the real pygame library but another module.

 

You can check which 'pygame.py' is your interpreter loading by running the following

import pygame
pygame.__file__

Also, which version of pygame do you have?

Share this post


Link to post
Share on other sites

By any chance do you have any file called 'pygame.py' in your python path (probably the directory from where you're launching the python interpreter)? Looks like it's not loading the real pygame library but another module.

 

You can check which 'pygame.py' is your interpreter loading by running the following

import pygame
pygame.__file__

Also, which version of pygame do you have?

I checked it,doesn't have any pygame.py,about the version this is what i downloaded:

eUzdFh9.png

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!