Logi. 0 Newbie Poster

Evening all,

Been working through a pygame tutorial i stumbled across the other day and typed it out (no copying an pasting as i needed to learn about it :D), and in the last clas i typed out, there is an error about RenderUpdates not accepting indexing....

The tutorial is pretty old (about 2 years) and im thinking that perhaps pygame has been updateds ince, and part of the code is now obselete???

Any one got any ideas??

Im not including the whole file unless required, just the bit the error comes from, if the whole file is required let me know ill edit it.....

# Turn each layout row into a sprite group
    for y in xrange(len(layout)):
        group = pygame.sprite.RenderUpdates()
        for x in xrange(len(layout[y])):
            if layout[y][x]:
                group.add(layout[y][x])
            group.y = 0
            layout[y] = group
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.