Skip to main content

getMemoryStore

Gets a memory store manager.

Scope Access

You can make the store private by setting the scope suffix to private. This will make the store only accessible by Admin Players and Server Scripts.

To learn more about scopes access, see Storage Access.

Syntax

engine.storage.getMemoryStore(name, scope);

Parameters

NameTypeDescription
namestringThe name of the memory store.
scopestringThe scope of the memory store. (default: global)

Returns

Example

const scores = engine.storage.getMemoryStore('scores');

await scores.set('player1', 100);

const player1Score = await scores.get('player1');

console.log('Player 1 score:', player1Score);

Available on: Client