warning 217: loose indentation
#2

The problem with the code above is readability. If you indent your code, you will notice that you never close bracket for each dialog so your current code indented is like this:
pawn Код:
if( dialogid == 15786)
{
    if( dialogid == 15787)
    {
        if( dialogid == 15788)
        {
            ...
If I were you, I would get rid of bProductPriceN constant in enumerator and it would be like this:
pawn Код:
new gBizz_ProductPrice[MAX_BIZZ][8];
pawn Код:
if (15786 <= dialogid <= 15793)
{
    if (response)
    {
        // check if value of PlayerInfo[playerid][pPBiskey] is not out of bounds (0 <= value < sizeof BizzInfo)
        // before you use it in BizzInfo array
     
        new product_price = strval(inputtext);
     
        if (product_price < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "EROR: Tidak boleh menggunakan - .");
     
        gBizz_ProductPrice[PlayerInfo[playerid][pPBiskey]][dialogid - 15786] = product_price;
    }
    return 1;
}
Much simpler.
Reply


Messages In This Thread
warning 217: loose indentation - by AlfaSufaIndo - 26.06.2018, 11:36
Re: warning 217: loose indentation - by Calisthenics - 26.06.2018, 11:56
Re: warning 217: loose indentation - by AlfaSufaIndo - 26.06.2018, 12:07
Re: warning 217: loose indentation - by Sasino97 - 29.06.2018, 14:58

Forum Jump:


Users browsing this thread: 1 Guest(s)