[Question] Reading from 2 files at the same time... - 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: [Question] Reading from 2 files at the same time... (
/showthread.php?tid=361291)
[Question] Reading from 2 files at the same time... -
Maxips2 - 20.07.2012
Hmm.. how would you read from 2 different files, at the same time and compare line-by-line correctly?
(Using fread, not a file system)
Re: [Question] Reading from 2 files at the same time... -
ReneG - 20.07.2012
Maybe this?
pawn Код:
while(fread(file1, string1) && fread(file2, string2))
{
}
Re: [Question] Reading from 2 files at the same time... -
Maxips2 - 20.07.2012
Nope, because if one of them will finish the last line, the other one will stop reading aswell.
Re: [Question] Reading from 2 files at the same time... -
ReneG - 20.07.2012
Then what would be the point of comparing 2 files if either one of the files cuts early?