v0.13.8
errors and warnings / stdlib

errors and warnings / stdlib / E8113

E8113 error

Settings control key not found in the store's type

area
stdlib (x8xxx)
fails the build
yes

A wowlua:settings control names a key that the store has no field for. The compiler checks each checkbox, slider, dropdown and color in the controls list against the type of store, which is the type of the defaults given to saved.bind. Usually the key is misspelled. Fix the key, or add the field to the defaults.

Example

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "addon": { "saved-variables": ["PlaygroundDB"] }}
src/main.wowluawowlua
import * as settings from "wowlua:settings"import * as saved from "wowlua:saved" local db = saved.bind("PlaygroundDB", { version = 1, defaults = { showMinimap = true } }) settings.register({    title = "Playground",    store = db,    controls = { settings.checkbox("showMiniMap", { label = "Minimap button" }) },})
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "addon": { "saved-variables": ["PlaygroundDB"] }}
src/main.wowluawowlua
import * as settings from "wowlua:settings"import * as saved from "wowlua:saved" local db = saved.bind("PlaygroundDB", { version = 1, defaults = { showMinimap = true } }) settings.register({    title = "Playground",    store = db,    controls = { settings.checkbox("showMinimap", { label = "Minimap button" }) },})

The compiler reports it like this:

error[E8113]: the store `{ showMinimap: boolean }` has no field `showMiniMap`
  ┌─ src/main.wowlua:9:36
  │
9 │     controls = { settings.checkbox("showMiniMap", { label = "Minimap button" }) },
  │                                    ^^^^^^^^^^^^^ here
codemessage
E8070Settings control bound to a field of the wrong type
E8107Settings dropdown option value not in the field's type

Offline

terminal
$ wowlua explain E8113
E8113 (error): Settings control key not found in the store's type

source on GitHub ↗