errors and warnings / manifest / E4120
E4120 error
SavedVariables name used by several addons in the workspace
- area
- manifest (x4xxx)
- fails the build
- yes
Two addons of one workspace use the same SavedVariables name. The client keeps SavedVariables in global variables, so both addons would read and overwrite the same saved data.
Give each addon its own name, for example one that starts with the addon's name.
Example
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "addon": { "saved-variables": ["PlaygroundDB"] }, "flavors": { "camelot": {} }, "workspace": { "members": ["options"], "default-members": ["."] }}{ "package": { "name": "playground-options", "version": "0.1.0" }, "addon": { "saved-variables": ["PlaygroundDB"] }, "flavors": { "camelot": {} }}{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "addon": { "saved-variables": ["PlaygroundDB"] }, "flavors": { "camelot": {} }, "workspace": { "members": ["options"], "default-members": ["."] }}{ "package": { "name": "playground-options", "version": "0.1.0" }, "addon": { "saved-variables": ["PlaygroundOptionsDB"] }, "flavors": { "camelot": {} }}The compiler reports it like this:
error[E4120]: SavedVariables `PlaygroundDB` is used by both `Playground` and `PlaygroundOptions` = in options/wowlua.json
Related codes
| code | message |
|---|---|
| E4325 | Two workspace members with the same addon.name |
Offline
$ wowlua explain E4120 E4120 (error): SavedVariables name used by several addons in the workspace