INI_String doesn't work
#1

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.
Reply
#2

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

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

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?
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)