SA-MP Forums Archive
INI_ParseFile Not loading Propperly - 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_ParseFile Not loading Propperly (/showthread.php?tid=381414)



INI_ParseFile Not loading Propperly [SOLVED] - park4bmx - 29.09.2012

once again im having trouble with INI_ParseFile

pawn Код:
forward Load(name[], value[]);
public Load(name[], value[])
{
if(!strcmp(name, "TelePlayerStat", true)) TelePlayer = strval(value);
if(!strcmp(name, "TelePlayerStat2", true)) TelePlayer2 = strval(value);
return 1;
}
//
INI_ParseFile("Player.txt", "Load",true, false );
Ok so the TelePlayerStat NEVER gets loaded
but the TelePlayerStat2 gets loaded sometimes but 1 in a 1000 tries

Why is that happening.
and yes i did a lot of debugging that's how i know this.

EDIT
output looks like this if Lucky to load anything. (this is my "printf")
Код:
Loading: яTelePlayerStat
Loading: TelePlayerStat2
How i solved it ?
i remembered that i had this problem before and ****** said that loading data without sections doesn't work well,
So i just put the data into sections, and all works fine