util.TableToKeyValues
From GMod Wiki
Function | |
Syntax |
util.TableToKeyValues( Table tab ) Where is this used? |
Description: | |
Returns a table formatted in a key-value style string. | |
Returns: | String |
Part of Library: | Util |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Util.TableToKeyValues]Util.TableToKeyValues [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
- Note the fact that my_table["extra"]["param4"] just disappears. Use tostring() like 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 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. Remember to use
require("glon")
.