Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Convert the meta to a table, including the userdata.
- function DOM_meta_para_tabela(meta)
- local retorno ={}
- local t_r = meta:to_table()
- local t = {}
- if t_r.inventory ~= nil then
- i = t_r.inventory
- if i.main ~= nil then
- local contagem =1
- t.inventory = {}
- t.inventory.main = {}
- for contagem=1,#(i.main),1 do
- interno = i.main[contagem]:to_table()
- t.inventory.main[tostring(contagem)] = interno
- end
- end
- if i.fields ~= nil then
- i.inventory.fields = {}
- t.inventory.fields = i.fields:to_table()
- end
- end
- retorno = t
- return retorno
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement