Saving
#5

Do what he did ^

Only problem is, this code that he provided won't work:

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Donator",PlayerInfo[playerid][pDonator]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
INI_Close(File);
Change it to this:

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Scores",PlayerInfo[playerid][pScores]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Donator",PlayerInfo[playerid][pDonator]);
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_Close(File);
Made it so it Gets the player skin BEFORE saving it, the way you did it before saves a nulled variable considering no value was ever placed on it before you saved it.
Reply


Messages In This Thread
Saving - by StrangeLove - 21.07.2012, 23:56
Re: Saving - by Kindred - 22.07.2012, 00:00
Re: Saving - by StrangeLove - 22.07.2012, 00:02
Re: Saving - by L.Hudson - 22.07.2012, 00:02
Re: Saving - by Kindred - 22.07.2012, 00:07
Re: Saving - by StrangeLove - 22.07.2012, 00:10
Re: Saving - by L.Hudson - 22.07.2012, 00:10
Re: Saving - by Kindred - 22.07.2012, 00:10
Re: Saving - by StrangeLove - 22.07.2012, 00:12
Re: Saving - by Kindred - 22.07.2012, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)