SA-MP Forums Archive
INI_String doesn't work - 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_String doesn't work (/showthread.php?tid=463133)



INI_String doesn't work - dusk - 10.09.2013

Hello, this is my code:
pawn Код:
stock LoadWorldInfo()
{
    INI_Load("GlobalInfo.ini");
    return 1;
}
INI:GlobalInfo[](name[],value[])
{
    INI_Int("LastRestart",WorldInfo[LastRestart]);
    printf("Will try to load string");
    INI_String("LastLicensePlate",WorldInfo[LastLicensePlate],sizeof(WorldInfo[LastLicensePlate]));
    printf("After string");
    return 0;
}
"WorldInfo[LastLicensePlate]" is an array of 8slots.

And only the text "Will try to load string" is printed, the other isn't. If i remove the "INI_String", it prints both lines.


Re: INI_String doesn't work - dusk - 10.09.2013

Where is that? I read a bit of this: https://sampforum.blast.hk/showthread.php?tid=175565


Re: INI_String doesn't work - Dragonsaurus - 10.09.2013

Where is Ini_Close? Put that at the end and try again.


Re: INI_String doesn't work - dusk - 10.09.2013

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
Where is Ini_Close? Put that at the end and try again.
What parameters am i suppose to give it ?:/

EDIT:******, could you point me to the documentation i need to read?

EDIT2: Is some kind of tag necessary? Or can i read data from tagless files?


Re: INI_String doesn't work - dusk - 10.09.2013

Ah, obvious and yet i fail to see it... Thanks again ******!