Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Mirnas_Tajic poslato April 15, 2011, 11:57:38 PRE PODNE

Naslov: [POMOC] Erori
Poruka od: Mirnas_Tajic poslato April 15, 2011, 11:57:38 PRE PODNE
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):/
Naslov: Odg: [POMOC] Erori
Poruka od: poznaticovik poslato April 15, 2011, 12:03:02 POSLE PODNE
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.
Naslov: Odg: [POMOC] Erori
Poruka od: Mirnas_Tajic poslato April 15, 2011, 12:07:47 POSLE PODNE
imas li ti kakvu komandu za  /lidere ali da nema Erora
Naslov: Odg: [POMOC] Erori
Poruka od: poznaticovik poslato April 15, 2011, 12:27:16 POSLE PODNE
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.
Naslov: Odg: [POMOC] Erori
Poruka od: Shone poslato April 15, 2011, 12:43:03 POSLE PODNE
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
Naslov: Odg: [POMOC] Erori
Poruka od: Mirnas_Tajic poslato April 15, 2011, 18:48:08 POSLE PODNE
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.
Naslov: Odg: [POMOC] Erori
Poruka od: System32 poslato April 15, 2011, 19:25:51 POSLE PODNE
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;
}
}