Closed Snaky4life closed 1 year ago
I checked the code and on line 17, it's supposed to be pygame.display.set_icon(Bean().sprite)
instead of pygame.display.set_icon(bean().sprite)
. The B is upper case because you're using the Bean class.
So change the "bean()" to "Bean()" and it should work 🙂.
You can check my pull request, I fix the bug https://github.com/PolyMarsDev/Flappuccino/pull/16
Hey, so when I run the project, I receive this error
PS C:\Users\orlan\OneDrive\Desktop\Flappuccino-main> & C:/Users/orlan/AppData/Local/Programs/Python/Python310/python.exe c:/Users/orlan/OneDrive/Desktop/Flappuccino-main/main.py pygame 2.1.2 (SDL 2.0.18, Python 3.10.5) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "c:\Users\orlan\OneDrive\Desktop\Flappuccino-main\main.py", line 277, in <module> main() File "c:\Users\orlan\OneDrive\Desktop\Flappuccino-main\main.py", line 17, in main pygame.display.set_icon(bean().sprite) UnboundLocalError: local variable 'bean' referenced before assignment