I have this code. 2 questions.
First how can I get the “unlocked” to give me the value. Right now it spits out nil
Second why is item 2 printing before item1? How can I have it in order?
itemList = {}
itemList.item1 = {}
itemList.item1.unlocked = true
itemList.item2 = {}
itemList.item2.unlocked = true
itemList.item3 = {}
itemList.item3.unlocked = true
for k in pairs(itemList) do
print(k)
print(k.unlocked)
end
Output:
item2
nil
item3
nil
item1
nil
Thanks [import]uid: 8192 topic_id: 13080 reply_id: 313080[/import]