I'm creating my own roll and move game called Dungeon Quest (actually I originally wrote it back in college but lost it) and I'm having an issue calling a list in one function but not in another and I don't understand why. This is only a small section of it.
Here's my inventory.py source: http://hastebin.com/uzeqelomeq.py
if I call list_inventory() it allows me to print out elements from the list.
Here's my Actions.py source: http://hastebin.com/rarivojoxu.py
If I import Inventory and call find_gold() it crashes with this:
File "/home/bran/dungeon-quest/actions.py", line 65, in find_gold print inv NameError: global name 'inv' is not defined
I'm doing the exact same thing so why doesn't it work?