Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error #32

Closed
Snaky4life opened this issue Aug 18, 2022 · 2 comments
Closed

Error #32

Snaky4life opened this issue Aug 18, 2022 · 2 comments

Comments

@Snaky4life
Copy link

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

@Xyc330
Copy link

Xyc330 commented Aug 24, 2022

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 🙂.

@JanPoonthong
Copy link

You can check my pull request, I fix the bug #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants