SA-MP Forums Archive
[SOLVED]fputchar&fgetchar puzzling me - 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: [SOLVED]fputchar&fgetchar puzzling me (/showthread.php?tid=71957)



[SOLVED]fputchar&fgetchar puzzling me - yezizhu - 05.04.2009

Dose function "fp(g)utchar" support linux or mac.?
I have no chance to test cuz my pc's platform is WINDOWS,but server's platform is linux(freeBSD).

here's DracoBlue' fcopy code,he mentions that requires for WINDOWS,
pawn Код:
/**
 * Copies a file (Source file won't be deleted!)
 * @param oldname
 *     newname
 * @requires WINDOWS
 */

fcopy(oldname[],newname[]) {
 new File:ohnd,File:nhnd;
 if (!fexist(oldname)) return false;
 ohnd=fopen(oldname,io_read);
 nhnd=fopen(newname,io_write);
 new buf2[1];
 new i;
 for (i=flength(ohnd);i>0;i--) {
  fputchar(nhnd, fgetchar(ohnd, buf2[0],false),false);
 }
 fclose(ohnd);
 fclose(nhnd);
 return true;
}
#pragma unused fcopy
Anyone know about it?thx^^


Re: [HELP]fputchar&fgetchar puzzling me - yezizhu - 05.04.2009

Bumb it....
Im waitting for answer here~~~Any help?


Re: [HELP]fputchar&fgetchar puzzling me - yezizhu - 05.04.2009

Bump it again...
Where's ur answer?


Re: [HELP]fputchar&fgetchar puzzling me - yezizhu - 07.04.2009

Bump it..Anyhelp?


Re: [HELP]fputchar&fgetchar puzzling me - Nubotron - 07.04.2009

Well he writted that it was broken on linux.. believe him, or test it yourself (test fputchar and fgetchar)! Why you say you cant test?



Re: [HELP]fputchar&fgetchar puzzling me - yezizhu - 08.04.2009

Quote:
Originally Posted by Nubotron
Well he writted that it was broken on linux.. believe him, or test it yourself (test fputchar and fgetchar)! Why you say you cant test?
Thanks,both you im believeing now.
I cannot test cuz of too lazy to doXD