aa = {
["test"] = {"o god"}
}
print(aa["test"])
I wan't it to print what "Test" holds, the value. But it will not print it, instead it just prints a table. I am not looking for print[1]. I am looking how to find something in a table by a name.
aa = {
["test"] = {"o god"}
}
print(aa["test"])
I wan't it to print what "Test" holds, the value. But it will not print it, instead it just prints a table. I am not looking for print[1]. I am looking how to find something in a table by a name.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
table.a or table["a"] something should work use ur bain pls
Ignore the troll. You have a table set to your value, so it will print a table as your value. You can change the value in aa to a different datatype, like a string to get you're expecting, or, print( aa["test"][1] ) since what you're trying to print is the first index of the table.
Got it working now, I used a string instead. Thanks!
Genius