Write a file
#1

Hi, i wanted to make a new Server Log. So, my idea was that, for every day, a new file will be made in the scriptfiles folder. That file must contain the date. How do i do that?
Reply
#2

pawn Код:
new
    Day, Month, Year,
    string[20],
    File:LogFile;

getdate(Year, Month, Day);
format(string, sizeof(string), "%d-%d-%d.txt", Year, Month, Day);
LogFile = fopen(string, io_readwrite);
fwrite(LogFile, "Your tosh goes here\n\r");
fclose(LogFile);
Along those lines...
Reply


Forum Jump:


Users browsing this thread: