I'm trying to store a list of variables which will be consistent throughout sessions using saved variables, at the minute it only seems to overwrite one table (still a bit new to this so sorry if I get terminology wrong or something).
Say I add myself to the table I will get this:
Code:
RolesDB = {
["Dumbfoundead"] = {
["Main"] = "Dumbfoundead",
["Roles"] = "Tank/Healer",
},
}
but then I add a guildy to the table it will override the field for myself with something like:
Code:
RolesDB = {
["Guildyman"] = {
["Main"] = "Guildymansmain",
["Roles"] = "DPS/Healer",
},
}
The code I'm currently using to do this is:
Code:
RolesDB[playerName:GetText()] = { ["Main"] = mainName:GetText(), ["Roles"] = playerRoles:GetText()}
There's also another problem, I would like to cross check what's in a text box with the table to display the properties inside it. Say I want to find out someone's main by entering their character name in the textbox, pressing a button and having their mains name pop up. I simply don't have a clue how I'd go about searching through the table to do it
Thanks for reading!