v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8353

E8353 error

settings.keybinding references a binding not declared with @binding

area
stdlib (x8xxx)
fails the build
yes

settings.keybinding(name, …) adds a key binding control to your options page, but no binding of that name is declared in the addon: neither with @binding from wowlua:bindings nor in the package's own Bindings.xml. The control would have nothing to bind. Declare the binding, or fix the name.

Example

× failswowlua
import * as settings from "wowlua:settings" local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" })print(control)
✓ compileswowlua
import * as settings from "wowlua:settings"import binding from "wowlua:bindings" @binding("MYADDON_TOGGLE", { label = "Toggle window" })local function toggleWindow()    print("toggle")end local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" })print(control)

The compiler reports it like this:

error[E8353]: `MYADDON_TOGGLE` is not a keybinding of this addon: declare it with `@binding`
  ┌─ src/main.wowlua:3:37
  │
3 │ local control = settings.keybinding("MYADDON_TOGGLE", { label = "Toggle window" })
  │                                     ^^^^^^^^^^^^^^^^ not declared
codemessage
E8352Invalid keybinding name (must match [A-Z][A-Z0-9_]*)

Offline

terminal
$ wowlua explain E8353
E8353 (error): settings.keybinding references a binding not declared with @binding

source on GitHub ↗