glon.decode

From GMod Wiki

Revision as of 08:18, 3 October 2009 by Dlaor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax glon.decode( String glon_encoded_string )
Where is this used?
Description:
Deserialises the given string into the original data. (Should be called using pcall)
Returns: Var
Part of Library: glon
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Glon.decode]Glon.decode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionRead and decode a table saved to a text file
Used onNewerServer.png
Code
 
readme = file.Read("mysavelocation.txt")
my_table = glon.decode(readme)
Msg(my_table["health"].."\n")
Msg(my_table["name"].."\n")
Msg(tostring(my_table["extra"]).."\n")
 
Output42

Fred

table: 03FDFA40


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox