sugarlabs / flappy-birds-activity

An arcade game for Sugar XOs.
1 stars 13 forks source link

Fix Error: local variable 'event' referenced before assignment. #28

Closed sparshg closed 2 years ago

sparshg commented 2 years ago

@chimosky Please review.

Traceback (most recent call last):
  File "/home/user/flappy-birds-activity/main.py", line 156, in make
    if (event.type == pygame.KEYDOWN and event.key == pygame.K_UP or event.type == pygame.MOUSEBUTTONDOWN) and self.keytest == 0:
UnboundLocalError: local variable 'event' referenced before assignment
chimosky commented 2 years ago

Reviewed and tested, thanks!

Wondering why we didn't get this earlier.