You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 🙂.
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
The text was updated successfully, but these errors were encountered: