import pygame, time
from pygame import *
pygame.init()
hod = 'n'
a = 0
def menu():
if a == 0:
menu_fon = image.load('img/menu_fon.png').convert_alpha()
menu_fon.blit(okno)
a = 1
return a
okno = display.set_mode((800, 600))
while hod != 'c':
for event in pygame.event.get():
if event.type == QUIT:
hod = 'c'
if hod == 'n':
menu()
display.flip()
time.wait(41)
if a == 0:
UnboundLocalError: local variable 'a' referenced before assignment