localStorage.set
From SmartBots Developers Docs
Revision as of 14:54, 6 October 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Puts a string value into a persistent storage.</onlyinclude> Also check localStorage.get(). <syntaxhighligh...")
Puts a string value into a persistent storage. Also check localStorage.get().
localStorage.set("old_data", "A value to store");
Reference
This command accepts the following parameters:
| Variable | Required | Description
| |
|---|---|---|---|
| Input: | |||
| name | yes | the name of the persistent value you would like to get.
JSON.stringify() | |
| Output: | |||
| result | This function does not return anything | ||
Comments
This function works similar to browser JavaScript localStorage.get(). It retrieves value from a persistent storage.
localStorage is shared by all scripts of the same bot. Thus, you can set values in one bot script and retrieve it in another script.