I try to make the little text-based rpg with the python. First thing I want to make is my input to equip armor or weapons.
def find_armor(x):
if x=="bad armor":
armor=bad_armor
if x=="good armor":
armor=good_armor
##item
armor=[0,0]
bad_armor=["bad armor",300]
good_armor=["good armor", 500]
##choose
option1,option2=input(">").split(" ",1)
if option1=="equip":
find_armor(option2)
##ui
armor_name=armor[0]
armor_point=armor[1]
print("your armor:",armor_name,armor_point)
This is my problem:
The function find_armor is not calling whatever I try to enter.
If my first word is the "equip" then my output is always: your armor: 0 0