BuildcordDocs

One run at a time

Make other runs wait until this one has finished.

data.lock makes runs that name the same thing take turns, so two of them can't read and change the same data at once.

Settings

SettingWhat it does
ForWhat's being protected, such as shop:{server.id}. Runs that name the same thing take turns.

Ways out

out. Turn on If it fails for a red way out.

Notes

  • Use it before reading rows you're about to change.
  • A narrower name allows more runs at once. shop:{server.id} lets different servers run together.

Example

Before checking a balance and then spending it, lock on shop:{user.id} so a double click can't spend it twice.

On this page