v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8020

E8020 error

saved.bind on a SavedVariable not declared in the manifest

area
stdlib (x8xxx)
fails the build
yes

saved.bind names a SavedVariable that the manifest doesn't declare. The game only saves variables that the TOC lists, and wowlua writes the TOC from addon.saved-variables and addon.saved-variables-per-character, so this data would never be saved.

Add the name to one of the two lists in wowlua.json, or fix its spelling.

Example

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

The compiler reports it like this:

error[E8020]: `MyAddonDB` is not declared in `addon.saved-variables` or `addon.saved-variables-per-character`
  ┌─ src/main.wowlua:2:23
  │
2 │ local db = saved.bind("MyAddonDB", { version = 1, defaults = { scale = 1 } })
  │                       ^^^^^^^^^^^ not in the manifest
codemessage
E8102saved.bind name is not a string literal
E8103SavedVariable bound twice with saved.bind

Offline

terminal
$ wowlua explain E8020
E8020 (error): saved.bind on a SavedVariable not declared in the manifest

source on GitHub ↗