Jan-11-2017, 09:47 PM
hey I want to blit user input to screen, I know how to blit text:
(example, not real code)
text = font.render("Enter Text Here", True, color)
screen.blit(text,(position))
So, i put in:
(example, not real code)
input_variable = input("prompt")
text = font.render(input_variable, True, color)
screen.blit(text,(position))
but then a message comes up saying
"TypeError: text must be string or unicode"
it's talking about the line where I define text because input_variable is not in quotes, but when I put it in quotes the text appears the literal words input_variable. how do I fix this
(example, not real code)
text = font.render("Enter Text Here", True, color)
screen.blit(text,(position))
So, i put in:
(example, not real code)
input_variable = input("prompt")
text = font.render(input_variable, True, color)
screen.blit(text,(position))
but then a message comes up saying
"TypeError: text must be string or unicode"
it's talking about the line where I define text because input_variable is not in quotes, but when I put it in quotes the text appears the literal words input_variable. how do I fix this