[POMOC]/Megaphone

Započeo David003
25. Jul 2012.
307
pregleda
3
postova
David003
5
Underboss
25. Jul 2012.
Skripta koju koristim: Moja (U obliku GF-a)
Opis problema: Napravio sam komandu /megaphone ali mi izbacuje 1 error

C:\Documents and Settings\David Babić\Desktop\server uklonjen!2\server uklonjen!2\gamemodes\CSRP.pwn(39345) : error 029: invalid expression, assumed zero

Dio Skripte:
  if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
                      {
                    if(IsPlayerConnected(playerid))
                        {
                    new text;
                for(new i; i < sizeof(ZabranjeneReci); i++)
            {
              if(strfind(text, ZabranjeneReci, true) != -1)
            {
              new string2;
            new playername2;
            GetPlayerName(playerid, playername2, sizeof(playername2));
                format(string2, sizeof(string2), "[!!!] %s(ID: %d): %s",playername2,playerid,text);
                ABroadCast(0x586433FF,string,1);
              }
            }

              new tmpcar = GetPlayerVehicleID(playerid);
              GetPlayerName(playerid, sendername, sizeof(sendername));
              new length = strlen(cmdtext);
              while ((idx < length) && (cmdtext <= ' '))
              {
        idx++;
              }
            new offset = idx;
            new result;
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
        result[idx - offset] = cmdtext;
        idx++;
              }
              result[idx - offset] = EOS;
              if(!strlen(result))
              {
        SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/m)egaphone [megaphone chat]");
        return 1;
            }
              if(gTeam == 2 || IsACop(playerid) || IsAnFbiCar(playerid) || IsASwatCar(playerid))
                        {
        if(!IsACopCar(tmpcar) || !IsAnFbiCar(tmpcar) || !IsASwatCar(tmpcar))
        {
    if(PlayerInfo == 1 || PlayerInfo == 1 || PlayerInfo == 3 || PlayerInfo == 3 || PlayerInfo == 17 || PlayerInfo == 17)
    {
    new currank;
    if(PlayerInfo == 1) { currank = "PD.Kadet"; }
else if(PlayerInfo == 2) { currank = "PD.Policajac"; }
else if(PlayerInfo == 3) { currank = "PD.Narednik"; }
else if(PlayerInfo == 4) { currank = "PD.Inspektor"; }
else if(PlayerInfo == 5) { currank = "PD.Porucnik"; }
else if(PlayerInfo == 6) { currank = "PD.Nacelnik "; }
else { currank = "PD.Kadet"; }
format(string, sizeof(string), "[%s %s:o< %s]", currank, sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    }
else if(PlayerInfo == 2||PlayerInfo == 2)
    {
new fbirank;
    if(PlayerInfo == 1) { fbirank = "FBI.Direktor"; }
else if(PlayerInfo == 2) { fbirank = "FBI.Zamjenik"; }
else if(PlayerInfo == 3) { fbirank = "FBI.Cobra"; }
else if(PlayerInfo == 4) { fbirank = "FBI.Tajni agent"; }
else if(PlayerInfo == 5) { fbirank = "FBI.Presretac"; }
else if(PlayerInfo == 6) { fbirank = "FBI.Agent"; }
else { fbirank = "FBI.Direktor"; }
format(string, sizeof(string), "[%s %s:o< %s]", fbirank, sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    }
    printf("%s", string);
        }
    else if(PlayerInfo == 3||PlayerInfo == 3)
    {
new swatrank;
    if(PlayerInfo == 1) { swatrank = "SWAT Direktor"; }
else if(PlayerInfo == 2) { swatrank = "SWAT.Zamjenik"; }
else if(PlayerInfo == 3) { swatrank = "SWAT.Narednik"; }
else if(PlayerInfo == 4) { swatrank = "SWAT.Vojnik"; }
else if(PlayerInfo == 5) { swatrank = "SWAT.Pozornik"; }
else if(PlayerInfo == 6) { swatrank = "SWAT.Ucenik"; }
else { swatrank = "SWAT.Direktor"; }
format(string, sizeof(string), "[%s %s:o< %s]", swatrank, sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    }
    printf("%s", string);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD2, "  Niste u policijskom vozilu!");
            return 1;
        }
            else
            {
            SendClientMessage(playerid, COLOR_GRAD2, "Niste clan Tima!");
        return 1;
            }
            }
                return 1;
                    }


Slika/Video: //
Deleted User
Obrisan korisnik
25. Jul 2012.
Koristi


Negdje imaš viška zareza/zagrada i sl.
David003
5
Underboss
25. Jul 2012.
Evo stavio sam u kod a ova linija na kojom izbacuje error je ovaj najzadnji else

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha