We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 782e151 commit cd7178cCopy full SHA for cd7178c
DCS-Input-Command-Injector-Quaggles/DCS-Input-Command-Injector-Quaggles/Scripts/Input/Data.lua
@@ -876,9 +876,15 @@ local function loadDeviceProfileDiffFromFile_(filename)
876
local func, err = loadfile(filename)
877
878
if func then
879
- printFileLog('File[' .. filename .. '] opened successfully!')
880
-
881
- return func()
+ local env = {}
+ setfenv(func, env)
+ local ok, res = pcall(func)
882
+ if ok then
883
+ printFileLog('File[' .. filename .. '] opened successfully!')
884
+ return res
885
+ else
886
+ log.error('Input Error:' ..res)
887
+ end
888
else
889
printFileLog(err)
890
end
0 commit comments