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

Re: [pygame] Surface lost errors



Hi Sparkes

Many people are invovled in compiling/creating documents for Pygame 1.8 right now (next to Xmas(s)). Thats why you probably dont get many answers yet. 

About your problem: Based on your code its hard to say what the error is producing. It could also come from the load_bg routine. F.e. the routine is returning anything else but not a routine. If you could list that as well....  The pic isnt lost between the sections, IF its there.

What Pygame version you are working?

Mery Xmas to all

Farai


Am 23.12.2006 um 12:07 schrieb Stephen Parkes:

I am getting apparently random surface lost errors in my game.

when using a hardware surface as a background image I started getting surface lost errors.  I wrapped the blit like this

try:
   scr.blit(bg,(0,0))
except:
   bg = load_bg()
   scr.blit(bg,(0,0))

with load_bg() returning the surface but I still get the same error on the second blit.  How is the surface being lost between loading it and blitting it in the except section?

cheers guys
sparkes

--
Steve 'sparkes' Parkes - tshirts http://nerd.ws - code http://zx-81.com