New files overwrite eachother
#4

SaveHouses(houseid)
{
new path[256];
format(path, 35, HOUSES_FILE, houseid);
if(INI_Exists(path) == 0)
{
houseid++;
format(path, 68, "Houses/%i.ini", houseid);
new INI:HouseFile = INI_Open(path);
INI_WriteString(HouseFile,"Owner", HouseInfo[houseid][hOwner]);
INI_WriteString(HouseFile,"Description", HouseInfo[houseid][hDes]);
INI_WriteInt(HouseFile,"Price", HouseInfo[houseid][hPrice]);
INI_WriteInt(HouseFile,"Rent", HouseInfo[houseid][hRent]);
INI_WriteInt(HouseFile,"World", HouseInfo[houseid][hWorld]);
INI_WriteInt(HouseFile,"Interior", HouseInfo[houseid][hInterior]);
INI_WriteFloat(HouseFile,"X", HouseInfo[houseid][hX]);
INI_WriteFloat(HouseFile,"Y", HouseInfo[houseid][hY]);
INI_WriteFloat(HouseFile,"Z", HouseInfo[houseid][hZ]);
INI_WriteFloat(HouseFile,"A", HouseInfo[houseid][hA]);
INI_Close(HouseFile);
return 1;
}
new INI:HouseFile = INI_Open(path);
INI_WriteString(HouseFile,"Owner", HouseInfo[houseid][hOwner]);
INI_WriteString(HouseFile,"Description", HouseInfo[houseid][hDes]);
INI_WriteInt(HouseFile,"Price", HouseInfo[houseid][hPrice]);
INI_WriteInt(HouseFile,"Rent", HouseInfo[houseid][hRent]);
INI_WriteInt(HouseFile,"World", HouseInfo[houseid][hWorld]);
INI_WriteInt(HouseFile,"Interior", HouseInfo[houseid][hInterior]);
INI_WriteFloat(HouseFile,"X", HouseInfo[houseid][hX]);
INI_WriteFloat(HouseFile,"Y", HouseInfo[houseid][hY]);
INI_WriteFloat(HouseFile,"Z", HouseInfo[houseid][hZ]);
INI_WriteFloat(HouseFile,"A", HouseInfo[houseid][hA]);
INI_Close(HouseFile);
print("Houses saved");
return 1;
}
Reply


Messages In This Thread
New files overwrite eachother - by Devix - 26.07.2012, 11:10
Re: New files overwrite eachother - by Devix - 26.07.2012, 13:02
Re: New files overwrite eachother - by AmigaBlizzard - 26.07.2012, 13:05
Re: New files overwrite eachother - by Devix - 26.07.2012, 13:06
Re: New files overwrite eachother - by AmigaBlizzard - 26.07.2012, 13:21
Re: New files overwrite eachother - by Devix - 26.07.2012, 13:26
Re: New files overwrite eachother - by Devix - 26.07.2012, 18:49
Re: New files overwrite eachother - by AmigaBlizzard - 26.07.2012, 20:45
Re: New files overwrite eachother - by Devix - 26.07.2012, 22:45
Re: New files overwrite eachother - by Devix - 27.07.2012, 12:22

Forum Jump:


Users browsing this thread: 4 Guest(s)