errors and warnings / manifest / W4031
W4031 warning
Packager @retail@ blocks left as written in a multi-version build
- area
- manifest (x4xxx)
- fails the build
- with --deny-warnings
A Lua or XML file of a converted packager project (compat.packager-keywords)
has a --@retail@ (or --@non-retail@) block, and the build covers several
flavors. Like the BigWigs packager in a multi-version build, wowlua leaves the
block as written, so the code in a --@retail@ block runs on every client,
not only on Retail.
Check the game at run time with WOW_PROJECT_ID. A project that releases one
game at a time can set compat.per-game, which applies the blocks per flavor.
Example
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {}, "vanilla": {} }, "compat": { "packager-keywords": true }}--@retail@print("Retail only")--@end-retail@{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {}, "vanilla": {} }, "compat": { "packager-keywords": true }}if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then print("Retail only")endThe compiler reports it like this:
warning[W4031]: `@retail@` blocks are left as written in a multi-version build, like the packager does = in src/main.lua = help: the code runs on every client; use Lua conditions on `WOW_PROJECT_ID` to limit it
Related codes
| code | message |
|---|---|
| E4335 | Packager @version-…@ blocks in a multi-version build |
| W4030 | Unsupported packager keyword |
Offline
$ wowlua explain W4031 W4031 (warning): Packager @retail@ blocks left as written in a multi-version build