Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NTU_LogPrint(filepath, mesg){
  2.    
  3.     var _Myarea = GetArea();
  4.     var _filepath = filepath;
  5.     var _mesg = mesg;
  6.    
  7.     var date = new Date().toLocaleFormat("<%a, %b %d, %H:%M>");
  8.     var logfile = FileOpen("_filepath", 2);
  9.     if(!logfile)
  10.         var logfile = FileOpen("_filepath", 1);
  11.  
  12.     logfile.WriteLine(date + " - " + _mesg + " ( " + _Myarea.name + " ) ");
  13.     logfile.Close();
  14. }
  15.  
  16. // file path format should be like this:
  17.  
  18. // "logs/errorlog/"+me.charname+"-errorlog.txt".....obv errorlog and -errorlog.txt will vary
  19.  
  20. // questions:
  21. // 1. are these vars actually needed?
  22. //      var _filepath = filepath;
  23. //      var _mesg = mesg;
  24.  
  25. // 2. something feels wrong/strange about this, but can't put my finger on it any input?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement