Advertisement
Guest User

Untitled

a guest
Apr 25th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #Convert the meta to a table, including the userdata.
  2. function DOM_meta_para_tabela(meta)
  3. local retorno ={}
  4. local t_r = meta:to_table()
  5. local t = {}
  6.  
  7. if t_r.inventory ~= nil then
  8. i = t_r.inventory
  9.  
  10. if i.main ~= nil then
  11. local contagem =1
  12. t.inventory = {}
  13. t.inventory.main = {}
  14.  
  15. for contagem=1,#(i.main),1 do
  16. interno = i.main[contagem]:to_table()
  17.  
  18. t.inventory.main[tostring(contagem)] = interno
  19. end
  20.  
  21. end
  22.  
  23. if i.fields ~= nil then
  24. i.inventory.fields = {}
  25. t.inventory.fields = i.fields:to_table()
  26. end
  27. end
  28.  
  29. retorno = t
  30. return retorno
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement