How would you procceed in order to print one of the desired numbers in the '['-brackets without using the number inside?
In a table like this:
local charmStats = {3,4,5,2,1,4,6,8,2,5,8,9,12,5,2}
you can simply print(charmStats[3]), I want same functioning but in the upper table.
Lua:
local charmStats = {
[13508] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}},
[24322] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}},
[5810] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}},
[32914] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+2%", "+3%"}},
}
In a table like this:
local charmStats = {3,4,5,2,1,4,6,8,2,5,8,9,12,5,2}
you can simply print(charmStats[3]), I want same functioning but in the upper table.
Post automatically merged:
Solved with this lil line:How would you procceed in order to print one of the desired numbers in the '['-brackets without using the number inside?
Lua:local charmStats = { [13508] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}}, [24322] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}}, [5810] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+250", "+350"}}, [32914] = {sockets = 2, statType = {"HP", "MP"}, statAmount = {"+2%", "+3%"}}, }
In a table like this:
local charmStats = {3,4,5,2,1,4,6,8,2,5,8,9,12,5,2}
you can simply print(charmStats[3]), I want same functioning but in the upper table.
Lua:
for _ in pairs(charmStats) do
print(_)
end
Last edited: