• table.insert key
    4 replies, posted
When inserting a table into another table, the key is set to [1], or whatever is the next sequential number. How I do set the key to what I want? https://i.imgur.com/lOuIYzB.png
Do you mean you want to set it to a string or a number or something? Either way, the bracket syntax works for this: local tbl = {} tbl["value"] = "something" tbl[2] = "something else"
Thanks, i knew that you made me relaize my mistake. I was retarded
Well you can't use table.insert for that. It only deals with numerical keys. I'm still not sure what string you want to use as a key, but whatever it is, you will have to do it yourself, as MPan1 banned showed you. // Both lines do the same thing bPly.Blacklist["blacklists"]["active"]["mystery string"] = bSQLTable bPly.Blacklist.blacklists.active["mystery string"] = bSQLTable
Thanks I got it guys!
Sorry, you need to Log In to post a reply to this thread.