20.04.2009, 01:17
I'm making a multisectional log and I've hit a snag with writing a file.
right now it's in 2 parts, general log and kills-deaths log. General Log works just fine, but in the same exact directory, Kills-Deaths causes a server crash, I can write the same thing in it, I can shorten the name, but it still crashes when I try to create the file in the same directory.
that works
that doesn't...
why?
EDIT** If I remove the first one, the second works fine... What the forizzle??
right now it's in 2 parts, general log and kills-deaths log. General Log works just fine, but in the same exact directory, Kills-Deaths causes a server crash, I can write the same thing in it, I can shorten the name, but it still crashes when I try to create the file in the same directory.
pawn Code:
new FileName[150];
new month[3],day,year;
GetMonthName(month);
getdate(year,day,day);
format(FileName,sizeof(FileName),"User Files/%s/%s-%d-%d/General.ini",PlayerName,month,day,year);
new File:file = fopen(FileName,io_append);
new string[300];
new hour,minute,second;
gettime(hour,minute,second);
format(string,sizeof(string),"[%02d:%02d:%02d] %s kills %s with %s\n",hour,minute,second,SenderName,PlayerName,text);
fwrite(file,string);
fclose(file);
pawn Code:
new DeathFile[150];
format(DeathFile,sizeof(DeathFile),"User Files/%s/%s-%d-%d/Kills-Deaths.ini",PlayerName,month,day,year);
new File:file1 =fopen(DeathFile,io_append);
new weaponname[20];
new Float:tmp,Float:tmp2,Float:tmp3,Float:tmp4;
gettime(hour,minute,second);
format(string,sizeof(string),"-----[%02d:%02d:%02d]-----\n",hour,minute,second);
fwrite(file1,string);
why?
EDIT** If I remove the first one, the second works fine... What the forizzle??