v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8117

E8117 error

profiles = true on a per-character SavedVariable

area
stdlib (x8xxx)
fails the build
yes

profiles = true was given for a per-character SavedVariable. Profiles let characters share setups, so they need an account-wide SavedVariable; the active profile of each character goes into <name>PerChar.

Bind an account-wide SavedVariable (addon.saved-variables) with profiles, and add its <name>PerChar to addon.saved-variables-per-character.

Example

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "addon": { "saved-variables-per-character": ["MyAddonCharDB"] }}
src/main.wowluawowlua
import * as saved from "wowlua:saved"local db = saved.bind("MyAddonCharDB", { version = 1, defaults = {}, profiles = true })print(db)
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "addon": {        "saved-variables": ["MyAddonDB"],        "saved-variables-per-character": ["MyAddonDBPerChar"]    }}
src/main.wowluawowlua
import * as saved from "wowlua:saved"local db = saved.bind("MyAddonDB", { version = 1, defaults = {}, profiles = true })print(db)

The compiler reports it like this:

error[E8117]: `MyAddonCharDB` is per character: profiles need an account-wide SavedVariable
  ┌─ src/main.wowlua:2:23
  │
2 │ local db = saved.bind("MyAddonCharDB", { version = 1, defaults = {}, profiles = true })
  │                       ^^^^^^^^^^^^^^^ per character
codemessage
E8021Profiles enabled without the per-character profile SavedVariable (<name>PerChar)

Offline

terminal
$ wowlua explain E8117
E8117 (error): profiles = true on a per-character SavedVariable

source on GitHub ↗