table.ToString

From GMod Wiki

Revision as of 21:36, 9 October 2009 by Unrealomega (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax table.ToString( Table table, String name, Boolean nice formatting )
Where is this used?
Description:
Convert a simple table to a string.
Returns: String
Part of Library: Table
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Table.ToString]Table.ToString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionConverts a table into a readable string.
Used onNewerShared.png
Code
iLike = {}
iLike.Fruit = "Banana"
iLike.Cars = "Lotus"
iLike.Jokes = "Internet"
 
stringOut = table.ToString(iLike,"Things that I like" , true)
 
Msg(stringOut .. "\n")
Output
Things that I like =
           Fruit = "Banana",
           Cars = "Lotus",
           Jokes = "Internet"


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox