Feb-03-2022, 06:39 PM
Hello,
I'm trying to code an arkanoid / breakout clone.
I have to check if the ball collides with the paddle or with one of the bricks (Later I want to use spritecollide for this).
But now I've got an error message for what I need some help.
This is the error message:
Traceback (most recent call last):
File "D:/Daten/Breakout-neu/main.py", line 89, in <module>
main()
File "D:/Daten/Breakout-neu/main.py", line 23, in main
paddlegroup.add(paddle)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 361, in add
sprite.add_internal(self)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 163, in add_internal
self.__g[group] = 0
AttributeError: 'Paddle' object has no attribute '_Sprite__g'
Please have a look on my code...
(it is attached as text files because I didn't get the code snippet working...)
And please be so kind and let me know what I'm doing wrong...
Greetings, flash77
I'm trying to code an arkanoid / breakout clone.
I have to check if the ball collides with the paddle or with one of the bricks (Later I want to use spritecollide for this).
But now I've got an error message for what I need some help.
This is the error message:
Traceback (most recent call last):
File "D:/Daten/Breakout-neu/main.py", line 89, in <module>
main()
File "D:/Daten/Breakout-neu/main.py", line 23, in main
paddlegroup.add(paddle)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 361, in add
sprite.add_internal(self)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 163, in add_internal
self.__g[group] = 0
AttributeError: 'Paddle' object has no attribute '_Sprite__g'
Please have a look on my code...
(it is attached as text files because I didn't get the code snippet working...)
And please be so kind and let me know what I'm doing wrong...
Greetings, flash77
Attached Files



