So I am currently making a RPG game, and I would like to add players to a table with 2 tools, and then I would like to know how to retreieve that data again.
And I know how to retrieve it now (edit): print(playerData["Player2"][1])
BUT
I do not know how I would add for example a player3, with the same values to the dictionary:
So, I’d like to add this for example: ["Player3"] = {2, 345345}
Somewhere in the dictionary, but how would I do that? Thanks.
I have come this far, but I don’t know how to set the name of the table inside the dictionary:
table.insert(playerData,1,2,545)
Thank you very much for help, and looking forward to your answer
Thanks for your reply, but I am not asking how to clone a dictionary, I am more interested in how to add a table to a dictionary, as I wrote in my post.