So I want to make a python game using pygame, and i want to set my fps as 60 but it comes out with an error.
Here is code:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
pygame.display.update()
clock.tick(60)
Here is error:
File "/Users/...", line 14, in <module>
clock.tick(60)
NameError: name 'clock' is not defined
Why is this happening???