I can never seem to figure this out. I have a table like such
[lua]local colors = {};
local colorName = ‘black’;
local color = ‘000000’;
colors[colorName] = tostring(color);[/lua]
but later, if I do
colors[colorName] I would expect ‘000000’ to be the response, but it’s not, it’s ‘black’. How can I get it to be ‘000000’ only knowing the name?
I know I this works:
colors[colorName] = {color=tostring(color)};
print(colors[colorName].color) – would print 000000 [import]uid: 19193 topic_id: 18691 reply_id: 318691[/import]