[HELP] dini_IntSet doesn't save integers
#1

I'm using dini.inc functions in my roleplay script to save user data from global variables but it doesn't.

I have a function SaveStats which is called OnPlayerDisconnect

Variables:

Код:
enum PlayerInfo
{
	pLogin,
	pAdmin,
	pMoney,
	pBankMoney,
	pTeam,
};

new pInfo[MAX_PLAYERS][PlayerInfo];
The func SaveStats:

Код:
public SaveStats(playerid)
{
	new pfilename[128];
	format(pfilename, sizeof(pfilename), "/Users/%s.ini", ReturnPlayerName(playerid));
	dini_Set(pfilename, "Admin", pInfo[playerid][pAdmin]);
	pInfo[playerid][pMoney] = GetPlayerMoney(playerid);
	dini_Set(pfilename, "Money", pInfo[playerid][pMoney]);
	dini_Set(pfilename, "BankMoney", pInfo[playerid][pBankMoney]);
	dini_Set(pfilename, "Team", pInfo[playerid][pTeam]);
	return 1;
}
Everything compiles and no errors. It also loads data from userfiles but it doesn't save.

Somebody has any ideas why?
Reply
#2

Using dini_IntSet instead of dini_Set. Cause dini_Set is just for strings.

- Draco
Reply
#3

i dont know why, (we are scripting together) but this is a really big problem for the future scripting.
Reply
#4

Quote:
Originally Posted by DracoBlue
Using dini_IntSet instead of dini_Set. Cause dini_Set is just for strings.

- Draco
Yes, I forgot that. Thanks for reply.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)