Money not saving FS
#1

Hey guys!

At a dialog you buy a car you have the following code:

Код:
			GivePlayerMoney(playerid, -VehicleValue[ids]);
            PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]-VehicleValue[ids];
            printf("Money: %i",PlayerInfo[playerid][pMoney]);
            SaveData(playerid);
Now if the player had 2000 dollars and the vehicle costs 50, the print would read: 1950.

Even at SaveData (include file with all playerinfo's in it) I have the following:

Код:
public SaveData(playerid)
{
	UserDataSave_data(playerid);
      return 1;
}

UserDataSave_data(playerid)
{
	new uFile[35];
 	format(uFile, 35, USER_FILE, GetName(playerid));
  	new INI:file = INI_Open(uFile); //will open their file
   	INI_WriteInt(file,"Money",PlayerInfo[playerid][pMoney]); 
       printf("Money:%i", PlayerInfo[playerid][pMoney]);
}
And guess what? Its still 1950 yet it didnt save into the file! So next time I spawn I still have 200 dollars!

How to fix this?
Reply


Messages In This Thread
Money not saving FS - by Devix - 31.10.2012, 21:34
Re: Money not saving FS - by Yamakei - 01.11.2012, 09:44
Re: Money not saving FS - by Biesmen - 01.11.2012, 09:52
Re: Money not saving FS - by Devix - 01.11.2012, 10:13
Re: Money not saving FS - by gtakillerIV - 01.11.2012, 10:15
Re: Money not saving FS - by Devix - 01.11.2012, 10:59
Re: Money not saving FS - by Biesmen - 01.11.2012, 12:00
Re: Money not saving FS - by Devix - 01.11.2012, 12:04
Re: Money not saving FS - by Devix - 05.11.2012, 10:20
Re: Money not saving FS - by Devix - 13.11.2012, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)