Camp of MurphyMade with Python
What can go wrong, will go wrong. You find yourself lost in the woods, being forced to kill your companions and survive. Why are you here?Recent comments (0)
My first discord bot ever, was very painful to make, but here she is!
I already know how to save variables and such, but only if the variable is an integer (an example being health = 100). I can save it to a .py file and
RYANTADIPARTHI name more of your variables global Screenshot 2020-11-13 at 2.45.17 PM Name more, and do the same thing you were doing. 2 years ago
Coder100 well yeah, you forgot to add a global for name. change your code to: def save(): global o, name, fav_code, age #open the file o = open('save.txt', 'w') o.write(name + ' ' + fav_code + ' ' + str(age) + ' ' + moo) #make sure to close the file o.close() `2 years ago