errors and warnings / manifest / E4335
E4335 error
Packager @version-…@ blocks in a multi-version build
- area
- manifest (x4xxx)
- fails the build
- yes
A Lua or XML file of a converted packager project (compat.packager-keywords)
uses a game version block such as --@version-mists@ in a build for several
flavors. The BigWigs packager refuses these blocks in a build for several game
versions, and wowlua does the same.
Check the game at run time with WOW_PROJECT_ID, or put the code in a file
that only some flavors load (build.flavor-files). 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": {}, "mists": {} }, "compat": { "packager-keywords": true }}--@version-mists@print("Mists only")--@end-version-mists@{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {}, "mists": {} }, "compat": { "packager-keywords": true }}if WOW_PROJECT_ID == WOW_PROJECT_MISTS_CLASSIC then print("Mists only")endThe compiler reports it like this:
error[E4335]: build type version keywords (`@version-…@`) are not allowed in a multi-version build = in src/main.lua = help: use Lua conditions on `WOW_PROJECT_ID` or TOC load conditions, like the packager asks
Related codes
| code | message |
|---|---|
| W4031 | Packager @retail@ blocks left as written in a multi-version build |
| W4030 | Unsupported packager keyword |
Offline
$ wowlua explain E4335 E4335 (error): Packager @version-…@ blocks in a multi-version build