I am trying to display questdata for any Active Quests but the print statment below says it cant find Description. I am new to Arrays / Tabels and don’t know what is wrong with my print statment or maybe the way I am doing my Array is wrong?
the print statment is after my Array definition in my code.
print(tostring(QuestData[ActiveQuests.name].Description))
local ActiveQuests = {}
table.insert(ActiveQuests, { name = "Q1", status = 0 })
local questData = {
["Q1"] = {
["ID"] = "1",
["Name"] = "Q1",
["Level"] = 0,
["NeededProgress"] = 10,
["RewardType"] = "Gold",
["RewardAmount"] = 100,
["Description"] = "Collect 3 Apples",
["Chat1"] = "Can you do my quest",
["Chat2"] = "Find three Apples",
["Chat3"] = "I will reward you with 20 gold"
},