anchor.diff:  
     fOnScriptError := aOnScriptError;
     fLogLinesCntMax := MAX_LOG_LINES_CNT_DEFAULT;
  -  Clear;
   end;
   
   
  
positive.code:   MAX_LOG_SIZE = 1024 * 1024; //1 MB
    MAX_LOG_LINES_CNT_DEFAULT = 100; //Default max number of log lines, allowed to be made by script
  
  { TKMScriptErrorHandler }
  constructor TKMScriptErrorHandler.Create(aOnScriptError: TUnicodeStringEvent);
  begin
  
negative.code:       gLog.AddTime('Script: ' + logErrorMsg); //log the error to global game log
        WriteLn(fl, Format('%23s   %s', [FormatDateTime('yyyy/mm/dd hh:nn:ss.zzz', Now), logErrorMsg]));
        CloseFile(fl);
        fLoggedTooManyLines := True;
      end;
    end;
  
  