[HELP] dini_IntSet doesn't save integers - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] dini_IntSet doesn't save integers (
/showthread.php?tid=81718)
[HELP] dini_IntSet doesn't save integers -
MadeMan - 13.06.2009
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?
Re: [HELP] dini_IntSet doesn't save integers -
DracoBlue - 13.06.2009
Using dini_IntSet instead of dini_Set. Cause dini_Set is just for strings.
- Draco
Re: [HELP] dini_IntSet doesn't save integers -
laser50 - 13.06.2009
i dont know why, (we are scripting together) but this is a really big problem for the future scripting.
Re: [HELP] dini_IntSet doesn't save integers -
MadeMan - 13.06.2009
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.