Warning
#1

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. ;>
Reply
#2

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.");
    }
Reply
#3

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;
}
Reply
#4

oh yeah , you are right kostas .
Reply
#5

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.
Reply
#6

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.");
        }
    }
Reply
#7

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.");
    }
}
Reply
#8

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.");
    }
}
Reply
#9

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)