[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] sprite module problems
Python 2.2c1 (#1, Dec 15 2001, 18:25:00)
[GCC 2.95.4 20011006 (Debian prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
yo
>>> import pygame, pygame.sprite, pygame.version
>>> pygame.ver
'1.2.1'
>>> a = pygame.sprite.Sprite()
>>> b = pygame.sprite.Group()
>>> a.add(b)
>>> a.remove(b)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/site-packages/pygame/sprite.py", line 129,
in remove
_spritegroup = 1 #dummy val to identify groupsnly sprite in
UnboundLocalError: local variable 'g' referenced before
assignment
my first efforts using the sprite module. I could be doing something
wrong but I've tried lots of various crap and it appears to be
impossible to remove a sprite from a group. Any help would be
appreciated.
Also, this is actually Pygame version 1.3... at least the filename of
the .tar.gz said it was 1.3, but the version.py file still says 1.2.1.
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org