Py3 passing variable frustrating me
I am having a heck of a time getting this code to work can someone pleae help? def CreationSetup(value): print(numchars) def CharacterCreation(): CCCheck = input( "Is this character creation?") if CCCheck == "yes": numchars = input("How many characters would you like to create?") CreationSetup(numchars) if CCCheck == "no": print("Bite") else: print('Please enter valid input!\n') CharacterCreation() CharacterCreation() for some reason the program refuses to pass numchars between the 2 functions, I have globaled it, declared it outside the function, and 4 or 5 other variations. I get error code e1121 and every tutorial I look at asay it should be as simple as returning numchars (which I tried to no avail), or calling a function with the numcharas variable as a parameter...but when I do that it keeps telling me the variable is undefined even though the only way to get to the function that ues it as a variable is a path that requires giving the numchars variable a value...please help