[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame.init In Multiple Files

--- Kris Schnee <kschnee@xxxxxxxxxx> wrote:

> os.path.join("graphics",(str(x) + ".jpg"))
> ).convert()
>          GENERIC_OBJECT_IMAGE = pygame.image.load( 
> os.path.join("graphics",GENERIC_OBJECT_IMAGE)
> ).convert()
>          GENERIC_PERSON_IMAGE = pygame.image.load( 
> os.path.join("graphics",GENERIC_PERSON_IMAGE)
> ).convert()

Massive lines like these were the culprits when I got
a similar problem. Something - dunno if it's Python,
pygame, or SDL - breaks when you try to complete a
string and load an image from it and convert it at the
same time. Break them up and it will probably work.

Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard.