here is the copy im trying
local Table = {["hello1"] = "hello2"}
I cant seem to do it right and im not sure how i can fix this
here is the copy im trying
local Table = {["hello1"] = "hello2"}
I cant seem to do it right and im not sure how i can fix this
Hello there. This is not a table but a dictionary. This is a table:
local Table = {"Hello", "Hello12"};
This is a dictionary:
local Dic = {["hello there"] = 23};
To fix this issue you're having, you can use a loop in this case.
for index, value in pairs(Dic) do
print(index, value)
-- this will print hello there = 23
I hope this helped you to understand a bit more.
Probably want to do it in a loop. Something like this:
local myTable = {["hello1"] = "hello2"}
for key, value in pairs(myTable) do
print(key)
print(value)
print()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
ohh thank you i understand it now
That is a table. Dictionaries are a type of table, the Table is an array.
This is not a table but a dictionary.It's a table. >~< Btw, you could just retrieve the value via its index. An example of this'sprint(Table[Index]) --> Whatever It's Defined As