19.11.2016, 03:03
So I was making some tests with "fseek" and I found that it always return "0".
I used the Wiki example in a blank script and I get the same problem...
This is my script:
My "file.txt":
Does it works for you?
Regards.
I used the Wiki example in a blank script and I get the same problem...
This is my script:
pawn Code:
public OnFilterScriptInit()
{
new File:handle = fopen("file.txt", io_read);
if(handle)
{
printf("Begin of file position: %d", fseek(handle, 0, seek_start));
printf("End of file position: %d", fseek(handle, 0, seek_end));
printf("Currrent file position: %d", fseek(handle, 0, seek_current));
fclose(handle);
}
else print("Failed to open \"file.txt\".");
return 1;
}
Code:
H20IBJWEKLBN23098NJWKLRGJSEFR V2IGODSJF2J40G9JRENBJOVKSDFGJW4IOFTG4W IW43GOSDIGJ4W9GHWG8ESOKGNSLV G3I4OGWJH4OIGJUW0EIJSGLKDVMKGL GWGNWONDISNSGDIOGDSOI420GN023I4N4GI01GT024IGJ40O3 42GI024NVO2ING2O4NGI2
Regards.