25.11.2020, 13:15
I'm not sure that filtering function is correct, try replacing it with this:
Code:
-- Check if all trends or selection neeed to be exported
if export_all == false then
tmp = {}
for _, t in ipairs(trends_table) do
for _, name in ipairs(trendnames) do
if name == t.name then
tmp[ #tmp + 1 ] = t
end
end
end
trends_table = tmp
end
-- Check if the is at least 1 trend to be exported