New files overwrite eachother
#1

Hey guys! I have the following script snippet:

Код:
	new h;
	while (h < sizeof(HouseInfo))
	{
		new randvir = 2 + random(1999999);
		new Float:x, Float:y, Float:z;
		new Float:a;
		GetPlayerPos(playerid,x,y,z);
		HouseInfo[h][hX] = x;
		HouseInfo[h][hY] = y;
		HouseInfo[h][hZ] = z;
		HouseInfo[h][hA] = a;
		HouseInfo[h][hDes] = name;
		HouseInfo[h][hPrice] = price;
		HouseInfo[h][hWorld] = randvir;
		HouseInfo[h][hRent] = 0;
		HouseInfo[h][hOwner] = 0;
		HouseInfo[h][hOwned] = 0;
		SaveHouses(h);
		h++;
		return 1;
	}
But it creates a file with the name "1" but not "2" etc, it basically rewrites the first file.

Any ideas?
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: 5 Guest(s)