Hello!
So i’m basically looping trough a table, and if the child is a table itself, loop trough it.
But for some reason, the code gives an error (at the second line) :
Modules.Data:2: stack overflow
Data.GetTableDescendants = function(Table, TableToFill)
for i, v in pairs(Table) do
if type(v) == "table" then
Data.GetTableDescendants(Table, TableToFill)
return
else
table.insert(TableToFill, {i, v})
end
end
end
Data.Load = function(Player, SelectedSave)
local TableDescendants = {}
Data.GetTableDescendants(SelectedSave, TableDescendants)
end
Does anyone know why?
The “SelectedSave” table is not even that big to cause that…