Loose Indentation... Cant find it :/
#1

Error:

Код:
warning 217: loose indentation
warning 217: loose indentation
Command:
Код:
CMD:bowner(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 4)
	{
		SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command.");
		return 1;
	}

	new string[128], houseid, ownername;
	if(sscanf(params, "dus[64]", houseid, ownername)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /bowner [Business ID] [Player]");

	if(!IsPlayerConnected(ownername)) {
    	return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
	}

	if(PlayerInfo[ownername][pBusiness] != INVALID_BUSINESS_ID && PlayerInfo[ownername][pBusiness2] != INVALID_BUSINESS_ID) {
	    return SendClientMessageEx(playerid, COLOR_GREY, "That player already owns another business.");
	}
   if(PlayerInfo[ownername][pBusiness] == INVALID_BUSINESS_ID) {
		Businesses[houseid][bOwner] = GetPlayerSQLId(ownername);
		strcpy(Businesses[houseid][bOwnerName], GetPlayerNameEx(ownername), MAX_PLAYER_NAME);
		PlayerInfo[ownername][pBusiness] = houseid;
		PlayerInfo[ownername][pBusinessRank] = 5;
		SaveBusiness(houseid);
		OnPlayerStatsUpdate(ownername);
		RefreshBusinessPickup(houseid);
		SendClientMessageEx(playerid, COLOR_GREY, "You have modified the owner of the business.");
	}
   else if(PlayerInfo[ownername][pBusiness2] == INVALID_BUSINESS_ID) {
		Businesses[houseid][bOwner] = GetPlayerSQLId(ownername);
		strcpy(Businesses[houseid][bOwnerName], GetPlayerNameEx(ownername), MAX_PLAYER_NAME);
		PlayerInfo[ownername][pBusiness2] = houseid;
		PlayerInfo[ownername][pBusinessRank2] = 5;
		SaveBusiness(houseid);
		OnPlayerStatsUpdate(ownername);
		RefreshBusinessPickup(houseid);
		SendClientMessageEx(playerid, COLOR_GREY, "You have modified the owner of the business.");
	}
	[COLOR="rgb(139, 0, 0)"]format(string, sizeof(string), "[ADMIN] %s modified Owner on Business %d to %s", GetPlayerNameEx(playerid), houseid, GetPlayerNameEx(ownername));[/COLOR]
	Log("logs/shoplog.log", string);
	return 1;
}
Reply
#2

You don't notice that the line you marked isn't aligned with the lines above?
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
You don't notice that the line you marked isn't aligned with the lines above?
lol, this.

Just press tab until it aligns.
Reply
#4

Or disable that retarded warning. And perhaps use a better IDE/Compiler?
Reply
#5

Lol been scripting all day. I guess i didn't see that.. Thanks guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)