I just started using PyGame and I'm trying to make a message show players when they lose, but I'm getting an error back.
red = (2555, 0, 0)
font = pygame.font.SysFont(None, 25)
def message_to_screen(msg,color):
screen_text = font.render(msg, True, color)
gameDisplay.blit(screen_text, [display_width/2, display_height/2])
--etc etc
message_to_screen("You Lose", red)
pygame.display.update()
time.sleep(2)
The exact error message is
screen_text = font.render(msg, True, color)
TypeError: Invalid foreground RGBA argument
I can't find any answers online. Please help!