cookie.GetNumber
From GMod Wiki
| Function | |
| Syntax |
cookie.GetNumber( String Name, Number Default ) Where is this used? |
| Description: | |
| Gets the value of a cookie as a number. Returns Default if the cookie is not found. | |
| Returns: | Number |
| Part of Library: | cookie |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Cookie.GetNumber]Cookie.GetNumber [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | sets cookie MyAge to 4 and prints it |
|---|---|
| Used on | |
| Code | cookie.Set("MyAge", 4) local age = cookie.GetNumber("MyAge") print("My age is " .. age) |
| Output | My age is 4 |