Y_Ini question
#3

I just noticed it doesn't save the variables im using. Example, i have TotalJoins.

OnPlayerConnect:

pawn Code:
ServerInfo[TotalJoins] ++;
This is how i load the file:

pawn Code:
INI_ParseFile(SERVER_INFO_PATH, "LoadServerData");
SERVER_INFO_PATH:
pawn Code:
#define SERVER_INFO_PATH "/server.ini"
LoadServerData function:

pawn Code:
LoadServerData(name[], value[])
{
    INI_String("MOTD", ServerInfo[sMOTD], 128);
   
    INI_Int("TotalKills", ServerInfo[TotalKills]);
    INI_Int("TotalDeaths", ServerInfo[TotalDeaths]);
   
    INI_Int("TotalAccounts", ServerInfo[TotalAccounts]);
   
    INI_Int("TotalJoins", ServerInfo[TotalJoins]);
   
    INI_Int("TotalMGDMKills", ServerInfo[TotalMGDMKills]);
    INI_Int("TotalSDMKills", ServerInfo[TotalSDMKills]);
    return 1;
}
What's wrong?
Reply


Messages In This Thread
Y_Ini question - by SymonClash - 27.03.2019, 09:52
Re: Y_Ini question - by polygxn - 27.03.2019, 10:29
Re: Y_Ini question - by SymonClash - 27.03.2019, 11:08
Re: Y_Ini question - by introzen - 27.03.2019, 11:50
Re: Y_Ini question - by SymonClash - 27.03.2019, 11:55
Re: Y_Ini question - by introzen - 27.03.2019, 12:06
Re: Y_Ini question - by SymonClash - 27.03.2019, 14:23
Re: Y_Ini question - by Hazon - 27.03.2019, 14:32
Re: Y_Ini question - by SymonClash - 27.03.2019, 14:49
Re: Y_Ini question - by SymonClash - 27.03.2019, 20:02
Re: Y_Ini question - by SymonClash - 28.03.2019, 09:12
Re: Y_Ini question - by SymonClash - 29.03.2019, 08:34
Re: Y_Ini question - by SymonClash - 29.03.2019, 14:14
Re: Y_Ini question - by SymonClash - 30.03.2019, 16:41

Forum Jump:


Users browsing this thread: 1 Guest(s)