G.TableToKeyValues
From GMod Wiki
Revision as of 17:18, 30 November 2011 by RTM xBEASTx (Talk | contribs)
This function is being moved to the util library once the GMod Beta 13 update becomes public |
Function | |
Syntax |
TableToKeyValues( Table table ) Where is this used? |
Description: | |
Converts a table into a key-value string. | |
Returns: | String |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.TableToKeyValues]G.TableToKeyValues [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
- Note the that my_table["extra"]["param4"] just disappears. Use tostring() as shown with "param3" to put booleans in the table.
Additional Notes
- This method of data storage is now considered deprecated. It is recommended to use GLON. GLON can encode/decode all types of data and does not return keys as lowercase. Unfortunately, the encoded data is no longer human-readable, but this only means the files can't be edited externally - it is much more efficient in all other manners.