Read hole file with fread - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Read hole file with fread (
/showthread.php?tid=183937)
Read hole file with fread -
The_Moddler - 17.10.2010
Is there any stock to read a hole file with fread?
Thanks
Respuesta: Read hole file with fread -
The_Moddler - 18.10.2010
Bumper !
Re: Read hole file with fread -
Hiddos - 18.10.2010
fread actually reads the whole file, it's just a li'l complicated.
You're most probably using:
pawn Код:
array = fread(file, io_read);
They way it's correctly done:
pawn Код:
while(fread(file, io_read))
{
//Code
}
A good idea of how it actually works can easily be found when looking into the SeifAdmin system, though I'm unsure if there's still a link around. Other then that, you could try looking it up in the dini.inc, but I wouldn't recommend that.