Answer the question
In order to leave comments, you need to log in
Error in Pygame:TypeError: 'str' object is not callable'. What to do?
I wrote the code but it keeps giving me an error.
The code:
import pygame
pygame.init()
size = (250,500)
screen = pygame.display.set_mode(size)
pygame.display.set_caption("Змуйка")
img = pygame.image.load("1zmeya.png")
pygame.display.set_icon(img)
font = pygame.font.SysFont('comicsansms'(32))
RED = (255,0,0)
GREEN = (0,255,0)
follow = font.render("Привет мир!",1,RED,GREEN)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
quit()
screen.blit(follow, (0,0))
pygame.display.update()
Answer the question
In order to leave comments, you need to log in
should be something like this:
font = pygame.font.SysFont('comicsansms', 32)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question