View Issue Details

IDProjectCategoryView StatusLast Update
0005869The Dark ModGUIpublic04.01.2022 06:49
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityN/A
Status assignedResolutionopen 
Product VersionTDM 2.10 
Target VersionTDM 2.11 
Summary0005869: Better diagnostic for syntax errors in GUI code
DescriptionThere are many errors in .gui which don't provided any kind of diagnostic.
Instead, parsing just continues, despite the fact that sometimes all the subsequent code is broken by the first error.

One such example is adding a semicolon at the end of window parameters:
  noTime 1;
The code expects GUI keyword instead of it, so it gets into "else" clause in idWindow::Parse.
It calls idWindow::ParseRegEntry, which cannot find the variable, and thus creates a custom one with semicolon as its name.
One can set breakpoint to the second part of idWindow::ParseRegEntry and catch such cases.
The same thing happens if someone writes "indowDef" or "ontipe" (i.e. keyword with a typo).

Ideally, some special syntax should be used to add custom parameters, and unknown word without it should generate error.

Another weird code location is probably idGuiScript::Parse.
I guess if one forgets a semicolon at the end of script command, it can pass without error, especially for a "set" command.
Steps To ReproduceFor instance, go to mainmenu_main.gui and add semicolon here:
      windowDef MainMenuParchment
         rect 280, 0, 320, 640;
Now you don't see the menu, although you at least see an error in this case =)

Or you can replace "windowDef LoadGameText" with "indowDef LoadGameText".
The menu boots up, but who knows which parts of GUI code are broken?
TagsNo tags attached.

Relationships

related to 0005758 closedstgatilov Cutscene video shortfalls in replay & embedded audio 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
04.01.2022 06:42 stgatilov New Issue
04.01.2022 06:42 stgatilov Status new => assigned
04.01.2022 06:42 stgatilov Assigned To => stgatilov
04.01.2022 06:42 stgatilov Relationship added related to 0005758
04.01.2022 06:49 stgatilov Steps to Reproduce Updated