I'm working on a dungeon styled game, and I made a file called places.py to store the places. I am using a class, then adding attributes to the class. I received an error, and here is the error message:
E0001:invalid syntax (, line 8)
Here would be my code for places.py:
class place(object):
def __init__(self):
self.name=''
self.nearplaces=[]
self.ground=[]
self.monsters=[]
1 = place
1.name='Ruby City'
1.nearplaces=[2,3]
1.ground=[1]
1.monsters=[]
It is confusing how, after declaration, I receive an error when trying to change the attributes. This may be a very simple question, but I wish to know why it does not work, and how to make it work. Thank you.
3e2?