Storage.flush(): Difference between revisions
(Created page with "Flushes storage.data. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended. ==Syntax== <syntaxhighlight lang="javascr...") |
No edit summary |
||
| Line 4: | Line 4: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.storage.data.auth = {"login": "testplayer", "password" | mp.storage.data.auth = {"login": "testplayer", "password": "qwerty" }; | ||
mp.storage.flush(); | mp.storage.flush(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 17:40, 22 August 2017
Flushes storage.data. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended.
Syntax
storage.flush();
Example
mp.storage.data.auth = {"login": "testplayer", "password": "qwerty" };
mp.storage.flush();