I have a dictionary:
local Skills = { ["IP"] = 1, ["virus"] = 1, ["firewall"] = 1, ["trace"] = 1, ["network"] = 1, ["remote"] = 1, ["physical"] = 1, ["stealth"] = 1, ["local"] = 1, ["cracker"] = 1, ["level"] = 1 }
but how do I access it?
If you're talking about accessing the information inside the dictionary, then you just index the table using a dot .
or square brackets [ ]
. I'm not gonna go into crazy detail about it, so I'll just leave you with these examples, as they're pretty easy to pick up:
local Skills = { ["IP"] = 1, ["virus"] = 1, ["firewall"] = 1, ["trace"] = 1, ["network"] = 1, ["remote"] = 1, ["physical"] = 1, ["stealth"] = 1, ["local"] = 1, ["cracker"] = 1, ["level"] = 1 } print(Skills["IP"]) -- Prints the value Skills.IP represents print(Skills.IP) -- this works too (because the key follows the same rules variables obide by) Skills.IP = 5 -- To change the key, simply set it a new value.
If you're confused about any of this, let me know. Sorry this couldn't be one of my long answers, I just didn't have the time.