Log issue
#1

Alright the problem is simple, it wont insert every message sent, it tends to save 1 message once and then no response

PHP код:
public IC_ChatLog(LogString[]) {
    new 
entry[128],YearMonthDayHourMinuteSecond;
    
getdate(YearMonthDay);
    
gettime(HourMinuteSecond);
    
format(entrysizeof(entry), "\r\n[%02d/%02d/%d][%02d:%02d:%02d]%s",Day,Month,YearHourMinuteSecond,LogString);
    
fwrite(ICChatLogFile,entry);
    return 
true;
}
OnPlayerText
format
(messagesizeof(message), "%s says: %s"GetRoleplayName(playerid), text);
    
IC_ChatLog(message); 
Destination, opening OnGameModeInit
pawn Код:
ICChatLogFile = fopen("Logs/Chat/InCharacter.log",io_append);

Closing the log OnGameModeExit
pawn Код:
fclose(ICChatLogFile);
Reply
#2

Have you tried closing the file every time you log and opening right before logging?
It shouldn't be much more taxing than it currently is, but don't take my word on it.
Reply
#3

Pfft to be honest, thats what I wanted to skip. I used that system, doesnt really turns out as efficiant
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)