whensonZWS / Trigger-Analyzer

2 stars 2 forks source link

Trigger Analyzer should say something like "this map has no triggers" instead of still saying "File detected, attempting to load" to empty maps #9

Closed MikillRosen closed 3 years ago

whensonZWS commented 3 years ago

Due to browser/file support being inconsistent across user, I remove some of the exception handling code to avoid some weird false positive so that most user can use this tool in the first place. This had the side effect of this generic message displaying for almost all errors.

Handling error in map file is not a trivial task as the TS/RA2 map files are just INI file with no restriction and a varieties of exception/error can simply arises from this, as I have mostly re-written the internal parsing once before to accommodate the complicated and inconsistent trigger-tag relationship.

I will start adding more error/exception handling, but it will be a slow process.

MikillRosen commented 3 years ago

by empty map, I mean a map with no triggers and variables

whensonZWS commented 3 years ago

Don't know why would anyone have variables when there is no triggers to interact with it. Warning only appears when trigger section is empty. Even if you somehow still have variables, the tool will still displaying variables along with the warning. This should work well.