fwrite crashing my server?
#6

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname,'_',' ');

    format(str, sizeof(str), "(American accent) %s says: %s", pname, text);
    ProxDetector(30.0, playerid, str, COLOR_WHITE);
    new lstring[254],File:log = fopen(LOG,io_write);
    format(lstring,254,"[chat] %s: %s\n",pname,text);
    fwrite(log,lstring);
    fclose(log);
    return 0;
}
Be sure to create a new line using \n.
Reply


Messages In This Thread
fwrite crashing my server? - by Walsh - 01.03.2012, 01:42
Re: fwrite crashing my server? - by 2KY - 01.03.2012, 01:43
Re: fwrite crashing my server? - by Walsh - 01.03.2012, 01:49
Re: fwrite crashing my server? - by 2KY - 01.03.2012, 01:50
Re: fwrite crashing my server? - by Walsh - 01.03.2012, 01:57
Re: fwrite crashing my server? - by 2KY - 01.03.2012, 01:59

Forum Jump:


Users browsing this thread: 1 Guest(s)