Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: improve Preprocessor error reporting for Dialog scripts #2389

Open
ivan-mogilko opened this issue Apr 19, 2024 · 0 comments
Open

Editor: improve Preprocessor error reporting for Dialog scripts #2389

ivan-mogilko opened this issue Apr 19, 2024 · 0 comments
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

Comments

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Apr 19, 2024

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.

@ivan-mogilko ivan-mogilko added type: bug unexpected/erroneous behavior in the existing functionality what: editor related to the game editor context: ui/ux context: game building related to compiling the game from input assets labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant