-- TIME_STAMP 2020-10-03 10:25:18 do local time = function() local tD = os.date("*t", os.time()) return string.format('%02d:%02d:%02d',tD.hour,tD.min,tD.sec) end print("+ ["..time().."] Syntax-Check <"..props['FilePath']..">") io.flush() local status, err = pcall(function() assert(loadfile(props['FilePath'])) end) if status then print("> ["..time().."] ------> OK") io.flush() else local filename = (props['FileNameExt']):gsub('([%(%)%.%%%+%-%*%?%[%^%$])', '%%%1') -- escape magic characters local line, errout = err:match(filename..":(%d+):%s+(.+)") editor:GotoLine(tonumber(line) -1) editor:LineEndExtend() -- go to error line, make it visible, select line print("! ["..time().."] Line: "..line..", ERROR: "..errout) io.flush() end end