YINI not load... - 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: YINI not load... (
/showthread.php?tid=593154)
YINI not load... -
DusanInfinity - 02.11.2015
Hi, i creating one system, and there is next codes:
PHP код:
public OnGameModeInit()
{
for(new org = 1; org < BR_ORGANIZACIJA; org++)
{
for(new slot = 1; slot < MAX_CLANOVAORG; slot++)
{
new gFile[45];
format(gFile, sizeof(gFile),"Clanovi/Organizacija_%d/Clan_%d.ini",org, slot);
if(fexist(gFile))
{
INI_Load(gFile);
printf("Y_INI | Clan %d organizacije %d ucitan!", slot, org);
}
}
}
PHP код:
forward UcitajClana(org,id, name[], value[]);
public UcitajClana(org,id, name[], value[])
{
INI_String("Ime",ORG_Clanovi[org][id][orgIme],MAX_PLAYER_NAME);
INI_Int("UsaoDan",ORG_Clanovi[org][id][orgDan]);
INI_Int("UsaoMesec",ORG_Clanovi[org][id][orgMesec]);
return 1;
}
FUNCTION: SacuvajClana(org,id)
{
new dFile[45];
format(dFile, sizeof(dFile),"Clanovi/Organizacija_%d/Clan_%d.ini",org, id);
if(fexist(dFile))
{
new INI:File = INI_Open(dFile);
INI_WriteString(File,"Ime",ORG_Clanovi[org][id][orgIme]);
INI_WriteInt(File,"UsaoDan",ORG_Clanovi[org][id][orgDan]);
INI_WriteInt(File,"UsaoMesec",ORG_Clanovi[org][id][orgMesec]);
INI_Close(File);
}
return 1;
}
And it save all data. But when i start server, it wont load data... Why? Is this INI_Load good or better is INI_ParseFile??
Re: YINI not load... -
N0FeaR - 05.11.2015
I would say INI is bad.