Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NTU_LogPrint(filepath, mesg){
- var _Myarea = GetArea();
- var _filepath = filepath;
- var _mesg = mesg;
- var date = new Date().toLocaleFormat("<%a, %b %d, %H:%M>");
- var logfile = FileOpen("_filepath", 2);
- if(!logfile)
- var logfile = FileOpen("_filepath", 1);
- logfile.WriteLine(date + " - " + _mesg + " ( " + _Myarea.name + " ) ");
- logfile.Close();
- }
- // file path format should be like this:
- // "logs/errorlog/"+me.charname+"-errorlog.txt".....obv errorlog and -errorlog.txt will vary
- // questions:
- // 1. are these vars actually needed?
- // var _filepath = filepath;
- // var _mesg = mesg;
- // 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