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

Re: [pygame] pygame.error: video system not initialized



Hi Alex,

Ok, I will be more specific from now on. As for debugging your program you should learn to use Python's debugger. It is how I found you problem with reseting "running" to True. I believe you intended line 40 in main.py:

if event.key==pygame.K_DOWN: #move down a square

to be:

elif event.key==pygame.K_DOWN: #move down a square

Then the terminating else clause that sets running would not have been executed.

Lenard

Alex Hall wrote:
On 5/21/10, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Hi DROID,

I was being deliberately vague because I understand Alex is a student,
and this is a project (?).
I am a student, but my first (and only) assignment regarding
Battleship was a couple years ago, in Java, and ran at the command
line. I have taken on its updating, translation (well, I am really
just writing it from scratch again, but in Python), and adding a gui
as a summer project; my own time, no assignment at all. In fact, I am
done with classes until September (thankfully) and all next year will
very probably not include any actual programming at all (more computer
theory and math...)