"For" loop breaking a command?
#1

I have a command to create a house pickup, and when i have the for loop in it the game displays "Server: Unknown command" however with the loop commented out it works. Anyone know whats wrong here? Even if you don't know just comment saying IDk, so i know if i should give up with the loop or not.

Код:
CMD:chouse(playerid)
{
	new hID;
	if(gPlayerData[playerid][ADMINLEVEL] < 1)return 1;
	for (new i = 0; i <= MAX_HOUSES; i++)
	{
		if(gHouseData[i][EXIST] != 0)
		{
			hID++;
		}
		else
		{
			continue;
		}	
	}
	GetPlayerPos( playerid, gHouseData[hID][LOCX], gHouseData[hID][LOCY], gHouseData[hID][LOCZ]);
	CreateDynamicPickup( 1237, 1, gHouseData[hID][LOCX], gHouseData[hID][LOCY], gHouseData[hID][LOCZ], -1, -1, -1);
	gPlayerData[playerid][CHOUSEID] = hID;
	gHouseData[hID][EXIST] = 1;
	SendClientMessage(playerid, COLOR_WHITE, "WTH");
	return 1;
}
Reply


Messages In This Thread
"For" loop breaking a command? - by dowster - 12.07.2011, 04:10
Re: "For" loop breaking a command? - by PotH3Ad - 12.07.2011, 05:36
Re: "For" loop breaking a command? - by dowster - 14.07.2011, 16:28

Forum Jump:


Users browsing this thread: 2 Guest(s)