darkmu
Well-Known Member
Hi, Can someone help me?
local config = {
system = {
[1] = {name = "Citizen",
IdsexMale = 128,
IdsexFemale = 136,
reqItems = {
[1] = {item = 2455, count = 1}, -- Crossbow
[2] = {item = 5904, count = 30}, -- Magic Sulphur
[3] = {item = 18427, count = 20}, -- Pulverized Ore
[4] = {item = 22396, count = 50}, -- Cluster of Solace
},
},
}
}
function Player:ModalAddon1(config, lastChoice)
local function buttonCallback(button, choice)
if button.text == "Sim" then
for i = 1, #config.system[lastChoice].reqItems[choice.id] do
print("HERE")
end
end
end
how do I access the table? of items .. to demonstrate
local config = {
system = {
[1] = {name = "Citizen",
IdsexMale = 128,
IdsexFemale = 136,
reqItems = {
[1] = {item = 2455, count = 1}, -- Crossbow
[2] = {item = 5904, count = 30}, -- Magic Sulphur
[3] = {item = 18427, count = 20}, -- Pulverized Ore
[4] = {item = 22396, count = 50}, -- Cluster of Solace
},
},
}
}
function Player:ModalAddon1(config, lastChoice)
local function buttonCallback(button, choice)
if button.text == "Sim" then
for i = 1, #config.system[lastChoice].reqItems[choice.id] do
print("HERE")
end
end
end
how do I access the table? of items .. to demonstrate