SA-MP Forums Archive
Opening a file, writing in it, then closing the 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: Opening a file, writing in it, then closing the file. (/showthread.php?tid=335953)



Opening a file, writing in it, then closing the file. - HazardGaming - 20.04.2012

Hello,
The title says it, I want to know how to do this for Y_INI.
I can make the CMD, I just need the code to make this possible.
Thanks.


Re: Opening a file, writing in it, then closing the file. - Shetch - 20.04.2012

Look up a tutorial.


Re: Opening a file, writing in it, then closing the file. - HazardGaming - 20.04.2012

I can't find one, that's why I asked here.


Re: Opening a file, writing in it, then closing the file. - WLSF - 20.04.2012

I won't use this, but i can help you with SII...
pawn Код:
INI_Open(filename); // Open / Create a file
INI_WriteString("Tag", "string"); // Write string with tag into 'filename' files
INI_WriteInt("Tag", value); // write a integer with tag into 'filename' files
INI_WriteFloat("Tag", float value); //write a float value with tag into 'filename' files
INI_ReadString(var, "Tag", size); //copy 'Tag' str value to 'var' for read...
INI_ReadInt("Tag"); //read integer per 'tag'
INI_ReadFloat("Tag"); //read float value per 'tag'
INI_Exist(filename); //verify if filename file exists
INI_Save(); //Save filename
INI_Close(); //close filename



Re: Opening a file, writing in it, then closing the file. - HazardGaming - 20.04.2012

Thanks William.