Editor: improve Preprocessor error reporting for Dialog scripts #2389
Labels
context: game building
related to compiling the game from input assets
context: ui/ux
type: bug
unexpected/erroneous behavior in the existing functionality
what: editor
related to the game editor
There's this problem that Dialogs are compiled like a one huge script module. Compiler can handle error reporting there, because it uses "sections" that let name certain regions in the code and reset line number counting. But preprocessor does not do that.
As a result, any preprocessor's error in dialogs mentions
_DialogScripts.asc
and a linenumber inside a combined mix of dialog scripts, rather than a linenumber in an individual dialog script, making searching for the source of error a tough task for the user.An example of a preprocessor error is non-closed string literal, for instance.
What could be done is to either teach preprocessor to parse the same "section" info that compiler does, or invent an alternative method of storing this information (where individual dialogs start and end in the combined file).
This information may be generated while gathering or converting dialog scripts, then stored, and used when reporting preprocessor's errors. I.e. if preprocessor errors at line X, that number would be converted to a matching dialog N and line M in that dialog script.
The text was updated successfully, but these errors were encountered: