cfrag Posted May 1, 2022 Share Posted May 1, 2022 It seems that since the last release of DCS, it no longer warns if a script cant be loaded or runs into an error; it now fails silently with no outward sign that anything is amiss. This makes it exceedingly difficult for me to develop any meaningful script. Please consider the following script blatant = {} function blatant.error() trigger.action.outText("Hi there, next line has an error", 30) trigger.action.outText("Hi there, next line has an error") -- delay missed trigger.action.outText("never shown, silent fail", 30) end function blattant.error2() -- even worse, this will prevent anything to run past above -- syntax error, blatant.error will NOT be invoked -- loading simply continues, no indication of error AT ALL end blatant.error() Above code has two errors. It misses the delay parameter in the second invocation of trigger.action.outText(), and the second function definition misspells 'blatant'. Usually, the first would generate an error/warning at runtime, the second would create a warning at load time. At least we can spot it when it occurs Currently, DCS loads the entire script, silently fails while loading, giving no indication that something is amiss - even though the script fails to load and aborts loading while parsing blattant.error2(). Nothing is executed, and you - the developer - is none the wiser, as everything looks fine. Can we please. please, please have the old warnings back, or at least make them optional (a debug on option perhaps)? The current "silent treatment" makes it very, very difficult to develop any non-trivial script. Here's the demo miz blatantErr.miz Link to comment Share on other sites More sharing options...
Solution toutenglisse Posted May 1, 2022 Solution Share Posted May 1, 2022 1 hour ago, cfrag said: ...Here's the demo miz... When I run the .miz I get : And when I remove the function blattant.error2(), I get : And also in DCS.txt logs : 2022-05-01 19:05:53.623 ERROR SCRIPTING: Mission script error: [string "blatant = {}..."]:4: Parameter #2 (delay) missed stack traceback: [C]: ? [C]: in function 'outText' [string "blatant = {}..."]:4: in function 'error' [string "blatant = {}..."]:8: in main chunk Link to comment Share on other sites More sharing options...
cfrag Posted May 1, 2022 Author Share Posted May 1, 2022 Hmmm. That's what I want! I'll try a full reboot Thank you so much! Link to comment Share on other sites More sharing options...
cfrag Posted May 1, 2022 Author Share Posted May 1, 2022 It required a full cold start, but it's again behaving as expected. Thank you so much, @toutenglisse, everyone else, please disregard. Cheers, -ch Link to comment Share on other sites More sharing options...
Recommended Posts