SA-MP Forums Archive
Loose Indentation... Cant find it :/ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Loose Indentation... Cant find it :/ (/showthread.php?tid=517412)



Loose Indentation... Cant find it :/ - Pboachie - 04.06.2014

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;
}



Re: Loose Indentation... Cant find it :/ - Vince - 04.06.2014

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


Re: Loose Indentation... Cant find it :/ - PrivatioBoni - 04.06.2014

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.


Re: Loose Indentation... Cant find it :/ - Deji - 04.06.2014

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


Re: Loose Indentation... Cant find it :/ - Pboachie - 04.06.2014

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