My Project Could't Save when i relog
#4

here we go
thats for example housing system, because garage,door,mapicon, and biz have a same bug

Код:
stock SaveHouses()
{
	new idx = 1, File:file;
	new string[256];
	while(idx < MAX_HOUSES)
	{
	    format(string, sizeof(string), "%d|%d|%d|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\r\n",
	    HouseInfo[idx][hLevel],
	    HouseInfo[idx][hPrice],
	    HouseInfo[idx][hStatus],
	    HouseInfo[idx][hOwner],
	    HouseInfo[idx][hX],
	    HouseInfo[idx][hY],
	    HouseInfo[idx][hZ],
	    HouseInfo[idx][hMoney],
	    HouseInfo[idx][hMaterials],
	    HouseInfo[idx][hWeed],
	    HouseInfo[idx][hCrack],
		HouseInfo[idx][hGun][0],
		HouseInfo[idx][hGunAmmo][0],
		HouseInfo[idx][hGun][1],
		HouseInfo[idx][hGunAmmo][1],
		HouseInfo[idx][hGun][2],
		HouseInfo[idx][hGunAmmo][2],
		HouseInfo[idx][hGun][3],
		HouseInfo[idx][hGunAmmo][3],
		HouseInfo[idx][hGun][4],
		HouseInfo[idx][hGunAmmo][4]
		);
	    if(idx == 1)
	    {
	        file = fopen("houses.cfg", io_write);
	    }
	    else
	    {
	    	file = fopen("houses.cfg", io_append);
	    }
		fwrite(file, string);
		fclose(file);
		idx++;
	}
	print("Houses saved successfully.");
}
Reply


Messages In This Thread
My Project Could't Save when i relog - by botak - 26.12.2013, 07:53
Re: My Project Could't Save when i relog - by botak - 26.12.2013, 10:35
Re: My Project Could't Save when i relog - by ProjectNewYork - 26.12.2013, 10:58
Re: My Project Could't Save when i relog - by botak - 26.12.2013, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)