SA-MP Forums Archive
Fseek & Fgetchar help - 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: Fseek & Fgetchar help (/showthread.php?tid=577009)



Fseek & Fgetchar difference - hhaaoo123 - 08.06.2015

Hello everyone, can anyone tell me which function should I use to get a character from a file?
I should use Fseek or Fgetchar?
For example, I only want the first line of the file and the third line, how can I get it?


Re: Fseek & Fgetchar help - Mauzen - 08.06.2015

Fseek sets the current position in the file, fgetchar gets the char at the current position, so you need both.

https://sampwiki.blast.hk/wiki/Fseek
https://sampwiki.blast.hk/wiki/Fgetchar


Re: Fseek & Fgetchar help - hhaaoo123 - 08.06.2015

Then how can I get a specific char in a file? like line 1 line 2?