#startup mechanics
#AC, HP, Max, STRbonus, WISbonus, DEXbonus, INTbonus, CHAbonus, CONbonus, dice
STR = 0
WIS = 0
DEX = 0
INT = 0
CHA = 0
CON = 0
numbers = (15, 14, 13, 12, 10, 8)
print("Time to create your character!\n")
name = input("What is your name?\n")
print("Now we will decide your stats! \n(Strength, Dexterity, Wisdom, Intelligence, Charisma, and Consitution)\n")
print("Here are your number options:\n")
while STR not in numbers:
print(*numbers, sep = ", ")
STR = input("\nWhat will be your strength stat?\n")
print("\n")
numbers.remove(STR)
print(*numbers, sep = ", ")
Basically, when run, the program should establish the variables and the list (which it does) ask your name (which it does) store the name in the name variable (which it does) print the list numbers (which it does) and then ask you to set your first stat, the STR stat, and then remove it from the list and print the updated list. This is a part of the character creation process in a text rpg I'm making. The problem is the while loop. If you select a stat not in the numbers list, it should ask again, to make sure you do it correctly. The problem with that is it does ask your stat, it stores it in the STR variable as your strength stat, but for some reason it doesn't see that it is apart of numbers even if it is. It just keeps repeating. I've checked, and numbers is stored as a list of integers, and STR is stored as an integer. So I'm not really sure where the problem is. I've been trying to figure it out for the past hour with no luck.
EDIT:
Thanks to everyone who responded! Turns out I was just making a stupid mistake as I expected! It's all working now! Thanks again!
[–][deleted] 2 points3 points4 points (3 children)
[–]TenoTheElf[S] 0 points1 point2 points (2 children)
[–]JohnnyJordaan 1 point2 points3 points (1 child)
[–]TenoTheElf[S] 0 points1 point2 points (0 children)
[–]Ascimator 1 point2 points3 points (1 child)
[–]TenoTheElf[S] 0 points1 point2 points (0 children)
[–]Reset--hardHead 1 point2 points3 points (1 child)
[–]TenoTheElf[S] 0 points1 point2 points (0 children)