Hey devs! I want to make a playlist. I want make two tables.
I dont really good speak english so i make a exemple
local history = {
sound1 = {'name', 0000000}
}
local list = {sound1 = {'name', 0000000},
sound2 = {'namE', 0000001},
sound4 = {'nAmE', 0000004}
}
I make a first table named history to stored the sounds already listened.
I know than I can substrac two tables if a make metatable. But I dont know how to use it correctly. Exemple of my expected result
setmetatable(history, list)
function ...()
-- ??
local playlist = (history - list)
-- ??
for i, s in pairs(playlist) do
...
end
...
end
--[[
expected result:
playlist = {sound2 = {'namE', 0000001},
sound4 = {'nAmE', 0000004}
}
]]
}
Sorry if is not precise i don't speak english i'm french and it's hard to talk english. Thanks for anwsers
Can I create that with MetaTable?

1 comment
Use __sub.