28.11.2013, 11:20
Check if it exist before reading it, And if not, then create it, using Fexist
pawn Код:
if(!fexist("sucks.txt"))
{
printf("failed to open sucks.txt, creating new one..");
new File:file = fopen("sucks.txt", io_write);
if(file) fclose(file);
}
new File:fp = fopen("sucks.txt", io_read);
if (fp)
{
new buf[128];
fread(fp, buf);
fclose(fp);
}