cookie.GetString

From GMod Wiki

Jump to: navigation, search
Function
Syntax cookie.GetString( String Name, String Default )
Where is this used?
Description:
Gets the value of a cookie as a string. Returns Default if the cookie is not found.
Returns: String
Part of Library: cookie
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Cookie.GetString]Cookie.GetString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

Descriptionsets cookie MyColor to blue and prints it
Used onNewerClient.png
Code
 
cookie.Set("MyColor", "blue")
local color = cookie.GetString("MyColor")
print("My favorite color is " .. color)
 
OutputMy favorite color is blue


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox