PDA

View Full Version : Loose Indentation... Cant find it :/


Pboachie
04/06/2014, 08:05 PM
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.");
}
format(string, sizeof(string), "[ADMIN] %s modified Owner on Business %d to %s", GetPlayerNameEx(playerid), houseid, GetPlayerNameEx(ownername));
Log("logs/shoplog.log", string);
return 1;
}

Vince
04/06/2014, 08:07 PM
You don't notice that the line you marked isn't aligned with the lines above?

PrivatioBoni
04/06/2014, 08:09 PM
You don't notice that the line you marked isn't aligned with the lines above?

lol, this.

Just press tab until it aligns.

Deji
04/06/2014, 08:16 PM
Or disable that retarded warning. And perhaps use a better IDE/Compiler?

Pboachie
04/06/2014, 10:46 PM
Lol been scripting all day. I guess i didn't see that.. Thanks guys