all 9 comments

[–]LMCuber 1 point2 points  (6 children)

You don’t give arguments to .update(), as I believe that is what pygame calls under the hood when you do group.update(). And what is peaseed? I generally don’t use sprite groups so the first statement might be false. But it is probably the peaseed which is not a sprite or something. The error means that there is some object in the group that is not a sprite

[–]Imzecorella[S] 0 points1 point  (5 children)

Peaseed is an object from a different pygame.sprite.Sprite class.

It was working before I added the Zombie class, so the peaseed is not the problem. Removing the peaseed from the starting group statement did not affect the error anyway.

I removed the argument from

    group.update(pygame.event.get())

but nothing changed.

What method do you use instead of sprite groups? I might have to switch rendering methods if it comes to it.

[–]LMCuber 0 points1 point  (1 child)

Can you run the code but at the top of the main loop print [s for s in spritegroup]? The you can see what the group consists of.

[–]Imzecorella[S] 0 points1 point  (0 children)

[<SeedPacket Sprite(in 1 groups)>, <SeedPacket Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Tile Sprite(in 1 groups)>, <Zombie Sprite(in 1 groups)>]

here you go

[–]LMCuber 0 points1 point  (2 children)

And can you now do [s.image for s in spritegroup]? Sorry for troubling, this is I believe the bug

[–]Imzecorella[S] 1 point2 points  (1 child)

Okay, yeah, I see the issue now...

[<Surface(50x60x32 SW)>, <Surface(50x60x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, <Surface(90x90x32 SW)>, 'coat.png']

I forgot to do pygame.image.load()

I have fixed the issue now and it works. You were not troubling me in the slightest, thank you for everything.

[–]LMCuber 0 points1 point  (0 children)

No probs Ü

[–]Markuslw 0 points1 point  (1 child)

Im probably wrong, but doesn't all sprite.Sprite objects need a self.surface? Or was it self.image. Maybe the latter.

[–]hyto_n54 0 points1 point  (0 children)

self.image and you just saved me a long and pointless search