for loc,item in pairs(worn_armor) do
local item_mat = string.match(item, "%:.+_(.+)$")
local worn_key = item_mat or "unknown"
for k,set_loc in pairs(armor.config.set_elements)do --<< ERROR
if set_loc == loc then
if set_worn[worn_key] == nil then
set_worn[worn_key] = 0
set_worn[worn_key] = set_worn[worn_key] + 1
else
set_worn[worn_key] = set_worn[worn_key] + 1
end
end
end
end
ERROR: