So in Pygame have a function that displays messages to users:
def message_to_user(msg, color, X_displacement, Y_displacement):
# creating function to display messages to the user
message=font.render(msg,True,color)
msgcenter=200+X_displacement,200+Y_displacement
Game_display.blit(message,msgcenter)
now there is a message I need to display with another variable showing aswell:
message_to_user("You managed to complete",levelcounter,"levels",green,0,40)
here is the error:
TypeError: message_to_user() takes exactly 4 arguments (6 given)
I understand why I am getting this error, just can't figure a way around it