Hello, I’m trying to make a dice game and it requires that I have:
1) A table of all quests (The case which is going on in the game)
2) A table of results (Depends on what the dice rolled)
3) A table of awards (Like adding tools, remembering values, names to another table)
Right now it looks like this:
local questBank = { { "Quest info"; "Rolled 1-3"; "Rolled 4-6"; "Rolled 7-9"; "Rolled 10"; AftermathFor13 = {name = "Eric", dad = "Gone"}; AftermathFor46 = {name = "Joseph"; dad = "Kind"}; AftermathFor79 = {name = "Albert"}; dad = "Millionaire"; AftermathFor10 = {name = "Kim", dad = "Korean"} }; "someotherquestsWithTables" }
So what I need to do is to get the TABLE itself and insert it into another table.
Let’s assume I rolled 7
--Text changes to: box.text = questBank[1][4] -- First quest, fourth string library = {} table.insert(library, questBank[1][8]) -- adding the AftermathFor79 table into library
The thing is, it may not only be name. So I need both name = “Albert” and dad’s status to be inserted.
It gives me nil all the time. Any help?