YINI not load...
#1

Hi, i creating one system, and there is next codes:
PHP код:
public OnGameModeInit()
{
for(new 
org 1org BR_ORGANIZACIJAorg++)
    {
        for(new 
slot 1slot MAX_CLANOVAORGslot++)
            {
            new 
gFile[45];
            
format(gFilesizeof(gFile),"Clanovi/Organizacija_%d/Clan_%d.ini",orgslot);
            if(
fexist(gFile))
              {
              
INI_Load(gFile);
              
printf("Y_INI | Clan %d organizacije %d ucitan!"slotorg);
              }
            }
    } 
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(dFilesizeof(dFile),"Clanovi/Organizacija_%d/Clan_%d.ini",orgid);
    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??
Reply
#2

I would say INI is bad.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)