[pomoc] zagrada

Započeo kuzma4244, Jul 05, 2011, 19:06:53 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mod: BU

Problem: Ja sam prepravljao komandu i negdje mi zagrada fali ali nzm gdje i izbacuje mi errore

Dio Skripte: if (strcmp(cmd, "/lideri", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_RED, " ");
        SendClientMessage(playerid, COLOR_RED, "-| LIDERI |-");
foreach (Player, i)
{
if(PlayerInfo[i][pLeader] >= 1 && PlayerInfo[i][pLeader] < 18)
    {
    new admtext[64];
        if(PlayerInfo[i][pLeader] == 1) { admtext = "MILICIJA"; }
        else if(PlayerInfo[i][pLeader] == 2) { admtext = "BIA"; }
    else if(PlayerInfo[i][pLeader] == 3) { admtext = "JNA"; }
    else if(PlayerInfo[i][pLeader] == 4) { admtext = "Hitna Pomoc"; }
    else if(PlayerInfo[i][pLeader] == 5) { admtext = "Yakuza"; }
else if(PlayerInfo[i][pLeader] == 6) { admtext = "LCN"; }
else if(PlayerInfo[i][pLeader] == 7) { admtext = "Gradonacelnik"; }
else if(PlayerInfo[i][pLeader] == 8) { admtext = "Hitman"; }
else if(PlayerInfo[i][pLeader] == 9) { admtext = "Novinari"; }
else if(PlayerInfo[i][pLeader] == 10) { admtext = "Taxi ORG"; }
else if(PlayerInfo[i][pLeader] == 11) { admtext = "Parking Servis"; }
else if(PlayerInfo[i][pLeader] == 12) { admtext = "Ruska Mafija"; }
else if(PlayerInfo[i][pLeader] == 13) { admtext = "-------"; }
else if(PlayerInfo[i][pLeader] == 14) { admtext = "-------"; }
else if(PlayerInfo[i][pLeader] == 15) { admtext = "Crips"; }
else if(PlayerInfo[i][pLeader] == 16) { admtext = "Bloods"; }
else if(PlayerInfo[i][pLeader] == 17) { admtext = "-------"; }
else { admtext = "------------";
{
    GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
   }
                        }
                     }
                  }
              return 1;
}


Slike:/

vlado_plavsic


Evo ti:

if (strcmp(cmd, "/lideri", true) == 0)
{
if(IsPlayerConnected(playerid))
    {
SendClientMessage(playerid, COLOR_RED, " ");
    SendClientMessage(playerid, COLOR_RED, "-| LIDERI |-");
foreach (Player, i)
{
if(PlayerInfo[i][pLeader] >= 1 && PlayerInfo[i][pLeader] < 18)
    {
    new admtext[14];
        if(PlayerInfo[i][pLeader] == 1) { admtext = "MILICIJA"; }
        else if(PlayerInfo[i][pLeader] == 2) { admtext = "BIA"; }
    else if(PlayerInfo[i][pLeader] == 3) { admtext = "JNA"; }
    else if(PlayerInfo[i][pLeader] == 4) { admtext = "Hitna Pomoc"; }
    else if(PlayerInfo[i][pLeader] == 5) { admtext = "Yakuza"; }
else if(PlayerInfo[i][pLeader] == 6) { admtext = "LCN"; }
else if(PlayerInfo[i][pLeader] == 7) { admtext = "Gradonacelnik"; }
else if(PlayerInfo[i][pLeader] == 8) { admtext = "Hitman"; }
else if(PlayerInfo[i][pLeader] == 9) { admtext = "Novinari"; }
else if(PlayerInfo[i][pLeader] == 10) { admtext = "Taxi ORG"; }
else if(PlayerInfo[i][pLeader] == 11) { admtext = "Parking Servis"; }
else if(PlayerInfo[i][pLeader] == 12) { admtext = "Ruska Mafija"; }
else if(PlayerInfo[i][pLeader] == 13) { admtext = "-------"; }
else if(PlayerInfo[i][pLeader] == 14) { admtext = "-------"; }
else if(PlayerInfo[i][pLeader] == 15) { admtext = "Crips"; }
else if(PlayerInfo[i][pLeader] == 16) { admtext = "Bloods"; }
else if(PlayerInfo[i][pLeader] == 17) { admtext = "-------"; }
else { admtext = "------------"; }

GetPlayerName(i, sendername, sizeof(sendername));
format(string, 39, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
    return 1;
}


I malo sam ti optimizirao komandu. ;)

Last nick: Paradox

nije bitno koji su errori, kad fali zagrada onda ti uvjek dode 26 errora, prebroj otvorene zagrade i onda prebroj zatvorene pa dodaj gdje fali, isto ima jedna FS ako nemos naci

http://forum.sa-mp.com/showthread.php?t=171429
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √