error 029: invalid expression, assumed zero HELP FAST

Započeo Jiky, Mart 08, 2019, 18:17:01 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

kako da fixam ovo
[pawn]//=============================================================================================
   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }[/pawn]
kod taj else crveni mi pokazuje taj error plz help

Pokusaj ovako:
[pawn]   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, -1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else return SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
      }
      return 1;
   }[/pawn]

EDIT: Ili ti je mozda COLOR_GRAD1 definisana kao Hexadecimal (HEX) boja.
Poslednja Izmena: Mart 08, 2019, 18:24:16 POSLE PODNE od Vasic
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Mart 08, 2019, 18:23:06 POSLE PODNE
Pokusaj ovako:
[pawn]   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, -1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else return SendClientMessage(playerid, COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
      }
      return 1;
   }[/pawn]

EDIT: Ili ti je mozda COLOR_GRAD1 definisana kao Hexadecimal (HEX) boja.
izbacilo mi error


Citat: Vasic poslato Mart 08, 2019, 18:30:58 POSLE PODNE
koji?
[pawn]C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(2256) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\User\Desktop\RedSummer\pawno\include\YSI\y_hooks/impl.inc(3114) : warning 219: local variable "rx" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\pawno\include\YSI\y_hooks/impl.inc(3114) : warning 219: local variable "ry" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\pawno\include\YSI\y_hooks/impl.inc(3114) : warning 219: local variable "rz" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(1924) : warning 201: redefinition of constant/macro (symbol "rInfo")
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(3726) : warning 203: symbol is never used: "playerid"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(4712) : warning 219: local variable "Ime" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(15779) : warning 213: tag mismatch
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(20645) : warning 209: function "AB_OnPlayerDeath" should return a value
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(21585) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(24532) : warning 219: local variable "idbiznis" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(25427) : warning 219: local variable "tmpobjid" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 213: tag mismatch
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39353) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39553) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39554) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39555) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39556) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(39557) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(31922) : warning 204: symbol is assigned a value that is never used: "vratameh2"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(31921) : warning 204: symbol is assigned a value that is never used: "vratameh1"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28768) : warning 204: symbol is assigned a value that is never used: "Vidro"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28767) : warning 204: symbol is assigned a value that is never used: "Mesas"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28766) : warning 204: symbol is assigned a value that is never used: "Cadeiras"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28765) : warning 204: symbol is assigned a value that is never used: "Balcao"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28764) : warning 204: symbol is assigned a value that is never used: "Parede"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28763) : warning 204: symbol is assigned a value that is never used: "ParedeB"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28762) : warning 204: symbol is assigned a value that is never used: "MuroI2"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28761) : warning 204: symbol is assigned a value that is never used: "MuroI"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28760) : warning 204: symbol is assigned a value that is never used: "Piso2"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(28759) : warning 204: symbol is assigned a value that is never used: "Piso"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(40392) : warning 219: local variable "rx" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(40392) : warning 219: local variable "ry" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(40392) : warning 219: local variable "rz" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(40823) : warning 219: local variable "idbiznis" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(41898) : warning 219: local variable "idbiznis" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(42125) : warning 219: local variable "idbiznis" shadows a variable at a preceding level
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(42189) : warning 213: tag mismatch
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(48230) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(51303) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(51303) : warning 215: expression has no effect
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(51303) : error 001: expected token: ";", but found "return"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(68317) : warning 204: symbol is assigned a value that is never used: "string1"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(69609) : warning 225: unreachable code
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(71042) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(71955) : warning 203: symbol is never used: "flash"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(71955) : warning 203: symbol is never used: "kiss"
C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(71955) : warning 203: symbol is never used: "pdcapwearg"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
[/pawn]
ZANEMARI WARNINZE

Stavi ovako i mora raditi:
[pawn]//=============================================================================================
   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, -1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }[/pawn]
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Mart 08, 2019, 18:38:03 POSLE PODNE
Stavi ovako i mora raditi:
[pawn]//=============================================================================================
   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17"); return 1; }
          {
              if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
             if(IsPlayerConnected(para1))
             {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, -1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }[/pawn]

[pawn]C:\Users\User\Desktop\RedSummer\gamemodes\RS.pwn(51304) : error 029: invalid expression, assumed zero[/pawn]
KOD OVOG else CEO DAN ME ZAJEBAVA

[pawn]   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0)
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17");
         }
            if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
          if(IsPlayerConnected(para1))
          {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, -1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }[/pawn] Ako ovo ne radi onda dodji PM.
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Mart 08, 2019, 18:44:14 POSLE PODNE
[pawn]   if(strcmp(cmd, "/makeleader", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          new Playername[24];
           GetPlayerName(playerid, Playername, sizeof(Playername));
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
                SendClientMessage(playerid, COLOR_GRAD1, "/makeleader [ID/Ime na Igrac] [broj(1-17)]");
            return 1;
         }
         new para1;
         new level;
         para1 = ReturnUser(tmp);
         tmp = strtok(cmdtext, idx);
         level = strval(tmp);
         if(level > 17 || level < 0)
         {
            SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}GRESKA:{FF0000}Ne mozete ispod 0 ili preko 17");
         }
            if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid,COLOR_GRAD1, "Nemozete da ja koristete ovaa komanda !");
          if(IsPlayerConnected(para1))
          {
                 if(para1 != INVALID_PLAYER_ID)
                 {
                     PlayerInfo[para1][pLeader] = 0;
                     PlayerInfo[para1][pMember] = 0;
                  GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  PlayerInfo[para1][pLeader] = level;
                  PlayerInfo[para1][pMember] = level;
                  PlayerInfo[para1][pRank] = 6;
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Promovirani ste vo lider da vodite org/banda/mafija od admin %s", sendername);
                  SendClientMessage(para1, COLOR_WHITE, string);
                  format(string, sizeof(string), "{FFFF00}INFO:{FF0000}Dadovte lider na %s da kontrolira so Org/Banda/Mafija so broj %d", giveplayer,level);
                  SendClientMessage(playerid, COLOR_WHITE, string);
                  PlayerInfo[playerid][pReputacijaL] = 0;
                  if(level == 0) { PlayerInfo[para1][pChar] = 101; gTeam[para1] = 0; }
                  else if(level == 1) { PlayerInfo[para1][pChar] = 283; } //PD
                  else if(level == 2) { PlayerInfo[para1][pChar] = 295; } //MBI
                  else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //ARM
                  else if(level == 4) { PlayerInfo[para1][pChar] = 70; } //MD
                  else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //ITALIJANSKAMAFIJA
                  else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //RUSKAMAFIJA
                  else if(level == 7) { PlayerInfo[para1][pChar] = 228; } //VLADA
                  else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitman
                  else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //Kanal 7
                  else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi
                  else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Direktor na inspekcii
                  else if(level == 12) { PlayerInfo[para1][pChar] = 115; } //LSG
                  else if(level == 13) { PlayerInfo[para1][pChar] = 270; } //GSF
                  else if(level == 14) { PlayerInfo[para1][pChar] = 248; } //MRD
                  else if(level == 15) { PlayerInfo[para1][pChar] = 104; } //Ballas
                  else if(level == 16) { PlayerInfo[para1][pChar] = 292; } //MexicanGang
                  else if(level == 17) { PlayerInfo[para1][pChar] = 110; } //Los Santos Vagos
                   PlayerInfo[para1][pTeam] = 11;
                   SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
               }
            }
         }
         else
         {
            SendClientMessage(playerid, -1, "Nemozete da ja koristete ovaa komanda !");
         }
      }
      return 1;
   }[/pawn] Ako ovo ne radi onda dodji PM.
citaj pm