Reading and writing a file. - 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: Reading and writing a file. (
/showthread.php?tid=547291)
Reading and writing a file. -
AndySedeyn - 21.11.2014
Is there a way to read and write in the file WHILE reading it?
My players have to register using a nickname and during the registration process they have to fill in the name of their character. Since that name is not connected to their playing name, I have to store all the names in use in a single file. Now, during this registration process I want to check whether or not the name chosen is in use.
How can I accomplish that?
I've tried using this tutorial about File Functions:
https://sampwiki.blast.hk/wiki/File_Functions
But I can't get it to work.
Does anyone have a useful tutorial or perhaps an example code? If this is even possible, that is.
Thanks in advance.