I am making a small game, and i want to make a input checker.
Now when a user makes a message in my game, i want my game to check the message and if the message is nothing it wont make the message. Instead it will print out this:
msg1 = input ("\033[1;34;40mType a message: ")
All until the user inputs a message that contains a character or a number. Now i have made my system of checking the message using functions, but it does not seem to work. It does what i told it to but when the user types something the message is nothing.
Here is my system:
def repeatmsg1():
msg1_ = input ("\033[1;34;40mType a message: ")
if msg1 == "":
msg1check()
def msg1check():
msg1 = input ("\033[1;34;40mType a message: ")
if msg1 == "":
repeatmsg1()
msg1 = input ("\033[1;34;40mType a message: ")
if msg1 == "" :
msg1check()