I am making a text game. And what I am doing is using another python file as a module in the Main python file(Mod File). And The main file calls The Input_Main_Colony() function and I know it's going there because if I put a print("Passed") in the if statement it will print.But it won't run the Cheats function. And the base game bases what it does next from return codes. 0 means nothing happened 1 means something happened. But it won't pass either codes. It seems the program tries to run Cheat but it errors out.
(If you need me to explain something from my code ask me please)
(If you need me to explain something from my code ask me please)
def Input_Main_Colony(Input, ColonyVarbles): if Input == "cheat" or Input == "cheats": return Cheat(ColonyVarbles) return 0 def Cheat(Varables): C("cls") print("You can change the amount of a resource. Which one?") print("People\nMaterials\nPeople\nWood\nCASE SENSITIVE") ThingChange = input(": ") C("cls") print("How much of this resource do you want?") Amount = int(input(": ")) Varables[ThingChange] = Amount return 1
try: Return = Mod.Input_Main_Colony(Input, Colony_Varables) time.sleep(2) except: pass^^^^^This is how I'm running the Input_Mian_Colony() funtion from the main file