errors and warnings / stdlib / E8114
E8114 error
settings.register called more than once
- area
- stdlib (x8xxx)
- fails the build
- yes
settings.register is called more than once. An addon has one options
category in the game's Settings panel. Put the other pages in
subcategories of the one registration.
Example
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "addon": { "saved-variables": ["PlaygroundDB"] }}import * as settings from "wowlua:settings"import * as saved from "wowlua:saved" local db = saved.bind("PlaygroundDB", { version = 1, defaults = { locked = false, debug = false } }) settings.register({ title = "Playground", store = db, controls = { settings.checkbox("locked", { label = "Lock frame" }),} })settings.register({ title = "Playground: Advanced", store = db, controls = { settings.checkbox("debug", { label = "Debug output" }),} }){ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "addon": { "saved-variables": ["PlaygroundDB"] }}import * as settings from "wowlua:settings"import * as saved from "wowlua:saved" local db = saved.bind("PlaygroundDB", { version = 1, defaults = { locked = false, debug = false } }) settings.register({ title = "Playground", store = db, controls = { settings.checkbox("locked", { label = "Lock frame" }),}, subcategories = { { title = "Advanced", controls = { settings.checkbox("debug", { label = "Debug output" }) } },} })The compiler reports it like this:
error[E8114]: `settings.register` is called more than once ┌─ src/main.wowlua:9:1 │ 6 │ ╭ settings.register({ title = "Playground", store = db, controls = { 7 │ │ settings.checkbox("locked", { label = "Lock frame" }), 8 │ │ } }) │ ╰────' first registered here 9 │ ╭ settings.register({ title = "Playground: Advanced", store = db, controls = { 10 │ │ settings.checkbox("debug", { label = "Debug output" }), 11 │ │ } }) │ ╰──────^ again │ = help: one options page per addon: put more pages in `subcategories`
Related codes
| code | message |
|---|---|
| E8080 | launcher.register called more than once (compile time for top-level calls, otherwise at runtime) |
Offline
$ wowlua explain E8114 E8114 (error): settings.register called more than once