0

the error im receiving is : file "/home/lucas/python/cargame/utils.py", line 17, in blit_text_center render = font.render(text, 1, (0, 0, 0)) pygame.error: Library not initialized

the problem which seems to be somewhere in this piece of code: def blit_text_center(win, font, text): render = font.render(text, 1, (0, 0, 0)) win.blit(render, (win.get_width()/2 - render.get_width() / 2, win.get_height()/2 - render.get_height()/2)) - this code is not the main.py code.

The problem could also have something to do with this piece of code: from utils import scale_image, blit_rotate_center, blit_text_center pygame.font.init()

Can anyone help?

LEJP
  • 1

0 Answers0