Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: KAKAN on Mar 07, 2016, 01:30 PM

Title: Server crash for logging too much data?
Post by: KAKAN on Mar 07, 2016, 01:30 PM
Well, I copied this code from the public beta:-
function onPlayerCrashDump( player, crash )
{
  TXTAddLine( FPATH + "crashes/" + GetFullTime2() + "_" + player.Name + ".log", crash );
}
function TXTAddLine(filename, text)
{
  local fhnd = file(filename, "a+");
  foreach(char in text) fhnd.writen(char, 'c');
  fhnd.writen('\n', 'c');
  fhnd.close();
  fhnd=null;
}
Any reasons why would it crash the server? I just added this line to the TXTAddLine function: fhnd.close();p
Why did it crash the server? I see no reason of crashing the server. Before someone asks: How did it crash? Let me tell, the whole crashlog was printed and then the server crashed.
Title: Re: Server crash for logging too much data?
Post by: Mötley on Mar 11, 2016, 08:52 PM
I do not understand this but maybe it is due to the spaces. Also seems you may of missed some writes, Replace With that and see what happens..

TXTAddLine( FPATH + "crashes/"+GetFullTime2()+""+player.Name+".log", "Crash", crash );
TXTAddLine, Never messed with that,.

If not I will Create something eles for you( i think that line caused the crash but i could be wrong)

Title: Re: Server crash for logging too much data?
Post by: KAKAN on Mar 19, 2016, 02:21 AM
Quote from: Mr_Motley on Mar 11, 2016, 08:52 PMI do not understand this but maybe it is due to the spaces. Also seems you may of missed some writes, Replace With that and see what happens..

TXTAddLine( FPATH + "crashes/"+GetFullTime2()+""+player.Name+".log", "Crash", crash );
TXTAddLine, Never messed with that,.

If not I will Create something eles for you( i think that line caused the crash but i could be wrong)


The crash happened only once, never encountered it again :P
So, I'm going to lock the topic. Anyways, thanks!