Saving inputtext into a simple text file
#4

pawn Код:
stock WriteLog(file[], input[])
{
    File:filevar;
    if(!fexist(file)) filevar = fopen(file, io_write);
    else filevar = fopen(file, io_append);
    if(!fexist(file))
    {
        printf("Failed to load '%s'", file);
        return 0;
    }
    else
    {
        new str[512];
        format(str, sizeof(str), "%s\r\n", input);
        fwrite(filevar, input);
        fclose(filevar);
        return 1;
    }
}
Reply


Messages In This Thread
Saving inputtext into a simple text file - by [SAP]HighFlyer - 01.07.2011, 11:06
Re: Saving inputtext into a simple text file - by Sascha - 01.07.2011, 11:11
Re: Saving inputtext into a simple text file - by Lorenc_ - 01.07.2011, 11:13
Re: Saving inputtext into a simple text file - by BigETI - 01.07.2011, 11:30

Forum Jump:


Users browsing this thread: 2 Guest(s)