Question:
I’m a newbie to coding with python but I tried to give it a go and I’m having trouble with my stats menu for the player. It says I haven’t assigned an attribute and I’m just kinda stumped, any help at all will be great. thanks in advance!
Repl link:
https://replit.com/@GoodIdeas/Crimson-Intent?v=1
code snippet:
class Vampire:
def __init__(self, name, age, clan):
self.name = name
self.age = age
self.clan = clan
self.resources = {"blood": 10, "money": 100}
self.location = "town square"
self.health = 100
self.is_daytime = False
.........
def display_stats(self):
print(f"Name: {self.name}")
print(f"Age: {self.age}")
print(f"Clan: {self.clan}")
print(f"Resources: {self.resources}")
print(f"Health: {self.health}")
print(f"Daytime: {self.is_daytime}")