[POMOC] Erori

Započeo Mirnas_Tajic, April 15, 2011, 11:57:38 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mirnas_Tajic

Skripta koju koristim:Balkan Evolution
Detaljan opis problema: ubacio sam komandu /lideri i izbacilo mi 4 erora
Dio skripte:
        C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(3971) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(20996) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(22001) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(22021) : warning 213: tag mismatch
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(22021) : warning 202: number of arguments does not match definition
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(67318) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(72697) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(72698) : warning 217: loose indentation
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(81674) : error 010: invalid function or declaration
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(81676) : error 010: invalid function or declaration
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(81680) : error 054: unmatched closing brace ("}")
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(81680 -- 81716) : error 010: invalid function or declaration
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI16.144\BalkanEvolution.pwn(81680 -- 81718) : warning 203: symbol is never used: "foreach"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Poslednja Izmena: April 15, 2011, 11:57:54 PRE PODNE od Mirnas_Tajic

poznaticovik

WARNING: Loose indentation - Poravnaj linije

WARNING: Number of arguments - znači da imaš previše nečega u kodu npr. u SendClientMessage ide playerid,boja,"tekst"); a taj error Number of arguments bi se pojavio ako bi ti dodao još nešto recimo

SendClientMessage(playerid, COLOR_GREEN, BLUE, "Tekst");

ERROR: Unmatched closing brace - Moraš imat jednak broj otvorenih/zatvorenih zagrada.

WARNING: Symbol is never used - Obriši "foreach" ili stavi napočetak skripte #pragma unused foreach.

Za ostale errore postaj nam linije.
Poslednja Izmena: April 15, 2011, 12:05:13 POSLE PODNE od [M]att

Mirnas_Tajic

imas li ti kakvu komandu za  /lidere ali da nema Erora

poznaticovik

Evo na brzinu trebalo bih raditi.

    if(strcmp(cmd, "/lideri", true) == 0)
    {
     SendClientMessage(playerid,COLOR_YELLOW, "Lideri online:");
     for(new i; i < MAX_PLAYERS; i++)
     {
     if(IsPlayerConnected(i))
     {
     if(PlayerInfo[playerid][pLeader] >= 1)
     {
     new imelidera[MAX_PLAYER_NAME];
     GetPlayerName(i, imelidera, sizeof(imelidera));
     format(string, sizeof(string), "** Ime: %s **", imelidera);
     SendClientMessage(playerid, COLOR_WHITE, string);
     }
     if(PlayerInfo[playerid][pLeader] >= 2)
     {
     new imelidera[MAX_PLAYER_NAME];
     GetPlayerName(i, imelidera, sizeof(imelidera));
     format(string, sizeof(string), "** Ime2: %s **", imelidera);
     SendClientMessage(playerid, COLOR_WHITE, string);
     }
     }
     }
     return 1;
     }


Ako hoćeš dodati više organizacija , pogledaj kako sam ja radio sam dodaš pLeader = 3 itd.
Ovo Ime i Ime2 promjeni u imena orgi koji su ti pod brojem 1 i 2.

Shone

Evo sam stavi svoja imena:

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] < 17)
    {
    new admtext[64];
        if(PlayerInfo[i][pLeader] == 1) { admtext = "Ime organizacije"; }
        else if(PlayerInfo[i][pLeader] == 2) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 3) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 4) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 5) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 6) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 7) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 8) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 9) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 10) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 11) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 12) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 13) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 14) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 15) { admtext = "Ime organizacijet"; }
else if(PlayerInfo[i][pLeader] == 16) { admtext = "Ime organizacije"; }
else { admtext = "------------"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
    format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
}
return 1;
}





Eto brate nadam se da sam ti pomogao

Mirnas_Tajic

Ej Shone obacio sam i izbaci mi ove erore

C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI90.680\BalkanEvolution.pwn(81674) : error 010: invalid function or declaration
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI90.680\BalkanEvolution.pwn(81676) : error 010: invalid function or declaration
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI90.680\BalkanEvolution.pwn(81680) : error 054: unmatched closing brace ("}")
C:\DOCUME~1\MIRNAS~1\LOCALS~1\Temp\Rar$DI90.680\BalkanEvolution.pwn(81680 -- 81716) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Probaj ovo za 3.error
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] < 17)
    {
    new admtext[64];
        if(PlayerInfo[i][pLeader] == 1) { admtext = "Ime organizacije"; }
        else if(PlayerInfo[i][pLeader] == 2) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 3) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 4) { admtext = "Ime organizacije"; }
    else if(PlayerInfo[i][pLeader] == 5) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 6) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 7) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 8) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 9) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 10) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 11) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 12) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 13) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 14) { admtext = "Ime organizacije"; }
else if(PlayerInfo[i][pLeader] == 15) { admtext = "Ime organizacijet"; }
else if(PlayerInfo[i][pLeader] == 16) { admtext = "Ime organizacije"; }
else { admtext = "------------"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 0)
{
format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
    format(string, 256, "%s ( %s )", sendername, admtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
}
return 1;
}
}

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 √