TheSuperHackers / SuperThyme

An open source re-implementation of Generals : Zero Hour written in C++.
GNU General Public License v2.0
0 stars 0 forks source link

Game Text Compiler needs additional validation checks #2

Open xezon opened 1 year ago

xezon commented 1 year ago

Game Text Compiler needs additional validation checks. Currently it soft fails when there is a formatting error. It can swallow string definitions without showing errors.

Example format error:

CONTROLBAR:ToolTipGLAUpgradeBuggyAmmor
US: "All rocket buggies have 25% "more" ammo."
END

Note the additional quotes without escaping inside the quoted text. This would not fail the compilation, but swallow strings (if I am not mistaken).

xezon commented 1 month ago

Game Text Compiler will fail if closing quote is missing, but error is not very descriptive:

ERROR : Game Text Compiler failed to execute commands
Execution stopped with error 'EXECUTION_ERROR' at command '-LOAD_STR_LANGUAGES' (4) and error string ''

Tested with

...
GUI:GameOptions
US: "GAME OPTIONS
DE: "Spieloptionen"
...

Needs improvement.