SA-MP Forums Archive
Warning - 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: Warning (/showthread.php?tid=302122)



Warning - vent - 07.12.2011

pawn Код:
gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
if(gPlayerLogTries[playerid] == 5)
{
    BanEx(playerid, "5 korda sisestas parooli valesti.");
    SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
}
Well, can somebody help me?
+rep who helps. ;>


Re: Warning - Neo Karls - 07.12.2011

try this

pawn Код:
gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
  if(gPlayerLogTries[playerid] == 5)
    {
    BanEx(playerid, "5 korda sisestas parooli valesti.");
    SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }



Re: Warning - Kostas' - 07.12.2011

Quote:
Originally Posted by Neo Karls
Посмотреть сообщение
try this

pawn Код:
gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
  if(gPlayerLogTries[playerid] == 5)
    {
    BanEx(playerid, "5 korda sisestas parooli valesti.");
    SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }
The warning is at the first line of the code he posted. Be sure the above code is same with
pawn Код:
gPlayerLogTries[playerid] += 1;
Example:
pawn Код:
// This is correct
CMD:example(playerid, params[])
{
    SendClientMessage(playerid, COLOR, "Just an example!");
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 5) {
        BanEx(playerid, "5 korda sisestas parooli valesti.");
        SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }
    // Rest Of Code
    return 1;
}
This is wrong
pawn Код:
// This is wrong
CMD:example(playerid, params[])
{
    SendClientMessage(playerid, COLOR, "Just an example!");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 5) {
    BanEx(playerid, "5 korda sisestas parooli valesti.");
    SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }
    // Rest Of Code
    return 1;
}



Re: Warning - Neo Karls - 07.12.2011

oh yeah , you are right kostas .


Re: Warning - vent - 07.12.2011

pawn Код:
if(!numrows)
            {
                new string[128];
                format(string,sizeof(string),"{E31919}Viga parooli sisestamisel!\n\nPalun sisesta хige parool:");
                ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{9E43B5}Veateade!",string,"Logi sisse","Loobu");       }
                gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
                if(gPlayerLogTries[playerid] == 5)
                {
                    BanEx(playerid, "5 korda sisestas parooli valesti.");
                    SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
                }
            }
This is the full script.


Re: Warning - sleepysnowflake - 07.12.2011

pawn Код:
if(!numrows)
    {
        new string[128];
        format(string,sizeof(string),"{E31919}Viga parooli sisestamisel!\n\nPalun sisesta хige parool:");
        ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{9E43B5}Veateade!",string,"Logi sisse","Loobu");       }
        gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
        if(gPlayerLogTries[playerid] == 5)
        {
            BanEx(playerid, "5 korda sisestas parooli valesti.");
            SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
        }
    }



Re: Warning - Kostas' - 07.12.2011

pawn Код:
if(!numrows)
{
    new string[128];
    format(string,sizeof(string),"{E31919}Viga parooli sisestamisel!\n\nPalun sisesta хige parool:");
    ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{9E43B5}Veateade!",string,"Logi sisse","Loobu");
    gPlayerLogTries[playerid] += 1;
    if(gPlayerLogTries[playerid] == 5) {
        BanEx(playerid, "5 korda sisestas parooli valesti.");
        SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }
}



Re: Warning - WLSF - 07.12.2011

pawn Код:
if(!numrows)
{
    new string[128];
    format(string,sizeof(string),"{E31919}Viga parooli sisestamisel!\n\nPalun sisesta хige parool:");
    ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{9E43B5}Veateade!",string,"Logi sisse","Loobu");       }
    gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation
    if(gPlayerLogTries[playerid] == 5)
    {
        BanEx(playerid, "5 korda sisestas parooli valesti.");
        SendClientMessage(playerid, COLOR_YELLOW, "Said banni, kuna sa sisestasid viis korda valesti parooli.");
    }
}



Re: Warning - Kostas' - 07.12.2011

A mistake the most did is this.
pawn Код:
ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{9E43B5}Veateade!",string,"Logi sisse","Loobu");     } // <--
    gPlayerLogTries[playerid] += 1; //will give this: warning 217: loose indentation



Re: Warning - English-Conceptz - 07.12.2011

loving how 4 people post the same reply hoping for Rep, so so SO sad.