How to get all of fread to one string?
#1

I have of problem with checking the string (which is full file) with strlen(string), becouse it checks only the last fread see down:

Thx.

pawn Код:
YCMD:test (playerid, params [], help)
{
    if (fexist ("Skins.txt"))
    {
        new File:File = fopen ("Skins.txt", io_read), string [50]; // <--- THIS STRING
        fread(File, string);
        fread(File, string);
        fread(File, string); //ONLY CHECKS THIS ONE
        fclose(File);

        if (strlen(string))
        {
            SendClientMessage (playerid, -1, "File is written already");
        }
        else SendClientMessage (playerid, -1, "File is empty!");
       
    }
    return true;
}
Reply


Messages In This Thread
How to get all of fread to one string? - by Riwerry - 27.01.2014, 12:43
AW: How to get all of fread to one string? - by NaS - 27.01.2014, 12:47
Re: How to get all of fread to one string? - by Riwerry - 27.01.2014, 12:48
AW: How to get all of fread to one string? - by NaS - 27.01.2014, 12:54
Re: How to get all of fread to one string? - by Riwerry - 27.01.2014, 12:56
AW: How to get all of fread to one string? - by NaS - 27.01.2014, 12:59
Re: How to get all of fread to one string? - by Riwerry - 27.01.2014, 13:01
Re: How to get all of fread to one string? - by [ABK]Antonio - 27.01.2014, 13:04
Re: How to get all of fread to one string? - by Riwerry - 27.01.2014, 13:08
AW: How to get all of fread to one string? - by NaS - 27.01.2014, 13:11

Forum Jump:


Users browsing this thread: 2 Guest(s)