Csantucci, on 13 October 2018 - 10:03 PM, said:
Csantucci, on 13 October 2018 - 10:03 PM, said:
if (this is MSTSSteamLocomotive)
I am happy to do this, and will add it.
I will also change a few other similar occurrences. However there are other locations where EngineType is also used as a test (and can't be easily adapted), so since the ENG file will not be correctly parsed, other problems with performance will be created. In this instance as it appears to be a dummy cab file the performance issues may not have been noticeable even if it loaded successfully.
I am wondering whether we could create an error checking message to appear in the log to advise a user that there is a potential problem with the file. For example all ENG files should have at least one engine parameter parsed successfully. Perhaps the Type parameter could be used as the test. So say, if no Type parameter is defined for an ENG file then a warning message is added to the log.
Can you think of an easy or better way to do this?
Thanks