Hi, Please look here
#1

I'm scripting turf taxes system and got a problem, Whenever I include use of Gangzones[id][gFACTION] (e.g. using its value), It causes UNKNOWN Command and returns 0, anyone knows why?
Код:
	new housesGz[500];
		new bizesGz[200];
		new moneyGz[100];
		for(new gz=0; gz < sizeof(Gangzones); gz++)
		{
			housesGz[gz] = 0;
			bizesGz[gz] = 0;
			moneyGz[gz] = 10000;
			for(new hid=0; hid < sizeof(House); hid++)
			{
			    if(IsCoordsInArea(House[hid][House_x], House[hid][House_y], Gangzones[gz][maxX], Gangzones[gz][minX], Gangzones[gz][maxY], Gangzones[gz][minY	]))
			    {
			        housesGz[gz]++;
			    }
			}
			for(new bid=0; bid < sizeof(biz); bid++)
			{
			    if(IsCoordsInArea(biz[bid][bizenter_x], biz[bid][bizenter_y], Gangzones[gz][maxX], Gangzones[gz][minX], Gangzones[gz][maxY], Gangzones[gz][minY]))
			    {
			        bizesGz[gz]++;
			    }
			}
   			SendClientMessage(playerid, COLOR_RED, "Pass till 1");
            if(Gangzones[gz][gFACTION] != 255 || Gangzones[gz][gFACTION] != -1 || Gangzones[gz][gFACTION] != 0)
            {
                moneyGz[gz] = housesGz[gz] + bizesGz[gz] * 12500;
                new fcabankx[128], fcabank;
                format(fcabankx,sizeof(fcabankx),"%sBank",GetFactionName(Gangzones[gz][gFACTION]));
                SendClientMessage(playerid, COLOR_RED, "Pass till 2");
				fcabank = dini_Int(globalstats,fcabankx);
				dini_IntSet(globalstats, fcabankx, fcabank + moneyGz[gz]);
				SendClientMessage(playerid, COLOR_RED, "Pass till 3");
				printf("[DEBUG] Faction %s turf money set!",GetFactionName(Gangzones[gz][gFACTION]));
            }
		}
I tried to debug, It can only show the message pass till 1, I tried before the formaat too and it passed but after format it dont, This is my getfactionname:

Код:
stock GetFactionName ( factionid )
{
	return teams[ GetTeam(factionid) ][teamname];
}
teams[id][teamname] value is MAX_STRING (12
and gFACTION of the enumerator _Gangzones is assigned as integer.
Reply


Messages In This Thread
Hi, Please look here - by MafiaOink - 26.03.2016, 15:55
Re: Hi, Please look here - by Mencent - 26.03.2016, 18:56
Re: Hi, Please look here - by MafiaOink - 28.03.2016, 12:56
Re: Hi, Please look here - by MafiaOink - 05.04.2016, 12:46
Re: Hi, Please look here - by introzen - 05.04.2016, 13:06
Re: Hi, Please look here - by sheNdjze - 05.04.2016, 13:24
Re: Hi, Please look here - by MafiaOink - 05.04.2016, 14:47
Re: Hi, Please look here - by MafiaOink - 05.04.2016, 16:49
Re: Hi, Please look here - by Crayder - 05.04.2016, 17:11
Re: Hi, Please look here - by MafiaOink - 06.04.2016, 08:52

Forum Jump:


Users browsing this thread: 2 Guest(s)