SA-MP Forums Archive
INI_WriteString and ...? - 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: INI_WriteString and ...? (/showthread.php?tid=422394)



INI_WriteString and ...? - Da_Noob - 13.03.2013

So you can write strings to an enum and these kinda things with INI_WriteString. So how to get a string from somewhere? I tried INI_String, but that didn't work.

Thanks in advance.


Re: INI_WriteString and ...? - Threshold - 13.03.2013

Well... INI_String is the correct way to go, BUT, some people often forget to add the string length/cell usage into INI_String.

Most Commonly Mistaken Use:
pawn Код:
INI_String(myfile, "PlayerName", savedname);
Proper Usage:
pawn Код:
INI_String(myfile, "PlayerName", savedname, 24);
Unlike INI_Int or INI_Float, this function DOES use an extra parameter. Without it, it usually returns a 'Undefined Symbol: INI_String' error.


Re: INI_WriteString and ...? - Da_Noob - 13.03.2013

Thanks, works!