RvEYoda Posted October 31, 2007 Posted October 31, 2007 I am currently in a project of making a mission rotator that reads from the mp_log file. The program is coming together nicely, input and output are read good, BUT I have one problem. I am unable to delete/clear the mp_log file after each mission. Lockon only deletes/cleares this file for me if I restart the game completely. Is there any way to make lockon force deleting this file after I as server exit the mission? It is also impossible to delete it manually while lockon is running. The file is locked by the lockon process(both in coalitions screen and ingame), and I don't know how to get around this (if it is even possible). If it is not possible I guess I could start from the last line when each mission is loaded....but the file gets rather big after a while ;) S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'
GGTharos Posted November 1, 2007 Posted November 1, 2007 THe other option is to shut down the game completely, which is, actually, a very good thing to do. [sIGPIC][/sIGPIC] Reminder: SAM = Speed Bump :D I used to play flight sims like you, but then I took a slammer to the knee - Yoda
RvEYoda Posted November 1, 2007 Author Posted November 1, 2007 well I tested my program now up to 240.000 lines in the mp_log file, and only then does it start to slow down (0.5 seconds :)) So I will just keep routine that reboot server at least once per month ;) Eventually I will implement a lockon.exe restart into the rotator, but not in for the first working versions. Now I just want it to run and rotate according to mission results. S = SPARSE(m,n) abbreviates SPARSE([],[],[],m,n,0). This generates the ultimate sparse matrix, an m-by-n all zero matrix. - Matlab help on 'sparse'
Mugatu Posted November 1, 2007 Posted November 1, 2007 What I do for the 3sqn stats engine is to just use seek("end"), lua, to move to the end of the file at mission start. You could do the same with C++ or whatever language your using.
Recommended Posts