Loose Identation..
#1

їQue es lo que tengo malo acб que me tira loose identation?

Код:
(2332) : warning 217: loose indentation
pawn Код:
dcmd_vcolor(playerid,params[]) {
    if(PlayerInfo[playerid][Vip] >= 1) {
        new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
        if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USA: /colorauto [color1] [color2]");
        new colour1, colour2, string[128];
        if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
        if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
        if(IsPlayerConnected(playerid)) {
            if(IsPlayerInAnyVehicle(playerid)) {
                CMDMessageToVips(playerid,"VColor");
                format(string,sizeof(string),"Has cambiado el color de tu %s a '%d,%d''", VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400], colour1, colour2 ); SendClientMessage(playerid,COLOR_CYAN,string); }
                return ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
            } else return SendClientMessage(playerid,red,"ERROR: No estбs en un carro");
        } else return SendClientMessage(playerid,red,"ERROR: No tienes nivel VIP suficiente para usar este comando");
    }
La lнnea del warning es esta:

pawn Код:
return ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
Reply
#2

pawn Код:
dcmd_vcolor(playerid,params[])
{
    if(PlayerInfo[playerid][Vip] >= 1)
    {
        new tmp[256], tmp2[256], tmp3[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
        if(!strlen(tmp) || !strlen(tmp2) || !strlen(tmp3) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USA: /colorauto [color1] [color2]");
        new colour1, colour2, string[128];
        if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
        if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                CMDMessageToVips(playerid,"VColor");
                format(string,sizeof(string),"Has cambiado el color de tu %s a '%d,%d''", VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400], colour1, colour2 );
                SendClientMessage(playerid,COLOR_CYAN,string);
            }
            return ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
        } else return SendClientMessage(playerid,red,"ERROR: No estбs en un carro");
    } else return SendClientMessage(playerid,red,"ERROR: No tienes nivel VIP suficiente para usar este comando");
}
Tenias mal la sangria, porque la llave te quedo al lado de la funcion xD
Reply
#3

EDIT: Me ganу de mano Neuz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)