27.01.2014, 12:43
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.
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;
}