Values and updates
- Added
- Updated
A namespace separates a feature’s keys from other features. Use a resource name or another stable name agreed by the participating scripts.
Pass strings, numbers, booleans, or JSON-serializable tables.
setMetadata(..., nil) and setValue(..., nil) remove a key.
setCharinfo accepts additional fields and does not rerun the character-creation name and birthdate validators, so callers must validate those edits.
local namespace = GetCurrentResourceName()
local accepted = exports.REC_Core:setValue(playerId, namespace, "tutorialComplete", true)
local completed = exports.REC_Core:getValue(playerId, namespace, "tutorialComplete")
setValues updates the supplied keys and leaves other keys intact.
It returns true if at least one key was accepted, so it is not an all-or-nothing batch.
An empty input returns false.
removeNamespace attempts to remove each key and can still return true when a handler rejects some deletions; inspect the remaining values if complete removal matters.
