SA-MP Forums Archive
Is fseek bugged? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is fseek bugged? (/showthread.php?tid=364576)



Is fseek bugged? - Maxips2 - 31.07.2012

Hey guys, I've been doing some tests and fseek was always returning 0, although by the samp-wiki it should return the new pos in the file.


Re: Is fseek bugged? - [MM]RoXoR[FS] - 31.07.2012

Show the code.


Re: Is fseek bugged? - Maxips2 - 31.07.2012

It doesn't matter how u doing, try it urself if you want, tell me if it returns something besides 0


Re: Is fseek bugged? - [MM]RoXoR[FS] - 31.07.2012

Ok, I agree, it seems to be bugged
pawn Код:
//TEST CODE
main()
{
        new File:test = fopen("test.txt",io_readwrite);
        fwrite(test,"I will seek to first '5th position' in file.");
        printf("Returned value is %d",fseek(test,5,seek_start));
        fclose(test);
}