this code
level1 = [(0,0), (20, 0), (40, 0), (60, 0), (80, 0), (100,0), (120,0), (140,0), (160,0), (180,0), (200,0), (220,0), (240,0)] #positions of enemies #yatta yatta def setenemies_lvl1(): # put enemies on screen.
pygame.display.set_caption("Loading Level") #tell player it's loading for item in level1: #loop throug coords in level file: lvl1 enemies.add(random.choice(("enemyblue.png", "enemycyan.png", "enemygrey.png", "enemyyellow.png")), item, enemybullets)
pygame.display.set_caption("PyStarFighter") #tell player it's done
is causing this problem:
File "/usr/local/lib/python2.6/site-packages/pygame/sprite.py", line 325, in add
self.add(spr)
####alot of the same message####
File "/usr/local/lib/python2.6/site-packages/pygame/sprite.py", line 316, in add if isinstance(sprite, Sprite): RuntimeError: maximum recursion depth exceeded while calling a Python object
|