SA-MP Forums Archive
[Ajuda] Warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Warning (/showthread.php?tid=384444)



Warning - felipe_mr - 11.10.2012

Ola pessoal, Eu gostaria de saber como tiro essa warning que esta dando neste Codigo /porbomba

pawn Код:
if(strcmp(cmd,"/mostrarlicencas",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_WHITE, "Use: /mostrarlicencas [id]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if (ProxDetectorS(8.0, playerid, giveplayerid))
                    {
                        if(giveplayerid == playerid) { MSGPLAYER(playerid, COLOR_GREY, "Para ver suas licencas Use: /minhaslicencas!"); return 1; }
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new text1[20];
                        new text2[20];
                        new text3[20];
                        new text4[20];
                        new text5[20];
                        if(PlayerInfo[playerid][pCarLic]) { text1 = "Positivo"; } else { text1 = "Negativo"; }
                        if(PlayerInfo[playerid][pFlyLic]) { text4 = "Positivo"; } else { text4 = "Negativo"; }

                        if(PlayerInfo[playerid][pBoatLic]) { text2 = "Positivo"; } else { text2 = "Negativo"; }
                        if(PlayerInfo[playerid][pFishLic]) { text3 = "Positivo"; } else { text3 = "Negativo"; }
                        if(PlayerInfo[playerid][pGunLic]) { text5 = "Positivo"; } else { text5 = "Negativo"; }
                        format(string, sizeof(string), "(=-=-=-=-==(Licenses of %s{BFC0C2})=-=-=-=-==|", sendername);
                        MSGPLAYER(giveplayerid, COLOR_WHITE, string);
                        format(string, sizeof(string), "** Motorista: %s.", text1);
                        MSGPLAYER(giveplayerid, COLOR_GREY, string);
                        format(string, sizeof(string), "** Piloto: %s.", text4);
                        MSGPLAYER(giveplayerid, COLOR_GREY, string);
                        format(string, sizeof(string), "** Marujo: %s.", text2);
                        MSGPLAYER(giveplayerid, COLOR_GREY, string);
                        format(string, sizeof(string), "** Pescador: %s.", text3);
                        MSGPLAYER(giveplayerid, COLOR_GREY, string);
                        format(string, sizeof(string), "** Armas: %s.", text5);
                        MSGPLAYER(giveplayerid, COLOR_GREY, string);
                        format(string, sizeof(string), "* %s mostrou suas licencas para vocк.", sendername);
                        MSGPLAYER(giveplayerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Vocк mostrou suas licencas para %s.", giveplayer);
                        MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
                    }
                    else
                    {
                        MSGPLAYER(playerid, COLOR_GREY, "   O Jogador esta longe de Vocк !");
                        return 1;
                    }
                }
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GREY, "   O Jogador estб Off-Line !");
                return 1;
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/porbomba", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GREEN, "USE: /porbomba [ID DA VITIMA]");
    return 1;
    }
    new vitima;
    new vitimac;
    vitima = ReturnUser(tmp);
    if(vitima != INVALID_PLAYER_ID)
    {
      if(playerid == vitima){SendClientMessage(playerid, COLOR_RED, "Nгo pode usar este comando em vocк mesmo!"); return 1;}
      vitimac = gLastCar[vitima];
      matador = playerid;
      if(PlayerInfo[playerid][pMembro] == 8 || PlayerInfo[playerid][pLider] == 8)
      {
          if(PlayerInfo[playerid][pCargo] >= 3)
          {
              if(carrobb1 == 0)
              {
                 new usando = 1;
                 new Float:vX,Float:vY,Float:vZ;
                 GetVehiclePos(vitimac,vX,vY,vZ);
                 if(PlayerToPoint(3.5,playerid,vX,vY,vZ))
                 {
                       if(ProxDetectorS(5.0, playerid, vitima))
                       {

                            for(new i = 0; i < MAX_PLAYERS; i++)
                            {
                                new ncar;
                                ncar = GetPlayerVehicleID(i);
                                if(!IsPlayerInVehicle(i, ncar))
                                {
                                    usando = 0;
                                }
                                else
                                {
                                    SendClientMessage(matador, COLOR_RED, "A bomba nгo pode ser plantada com a pessoa no carro");
                                    return 1;
                                }
                            }
                            if(usando == 0)
                            {
                                vitimacarro = vitimac;
                                carrobb1 = 1;
                                SetTimer("tempocarrobb1", 120000, 0); // 000 = milйsimos entгo 1000 = 1 segundo, logo 300000 = 5 minutos
                                usando = 1;
                                SendClientMessage(playerid,0xFFFF00AA,"Bomba plantada.");
                                return 1;
                            }
                            else
                            {
                                SendClientMessage(matador, COLOR_RED, "A bomba nгo pode ser plantada com a pessoa no carro");
                                return 1;
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_RED, "A vнtima estб muito prуxima б vocк.");
                            return 1;
                        }

                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_RED, "Vocк nгo estб perto do carro da vнtima.");
                        return 1;
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_RED, "Aguйm usou este comando, aguarde alguns minutos.");
                    return 1;
                }
             }
             else
             {
                 SendClientMessage(playerid, COLOR_RED, "Deve ser cargo 3+");
                 return 1;
             }
             }
             else
             {
                SendClientMessage(playerid, COLOR_RED, "Vocк nгo й Hitman, para usar este comando.");
                return 1;
             }
             }
             else
             {
                SendClientMessage(playerid, COLOR_RED, "Nъmero Invбlido.");
                return 1;
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/laptop", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMembro] == 8 || PlayerInfo[playerid][pLider] == 8)
            {
                if(ConnectedToPC[playerid] == 255)
                {
                    MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Vocк desligou seu laptop, e se desconectou de sua Agкncia.");
                    ConnectedToPC[playerid] = 0;
                    return 1;
                }
                GetPlayerName(playerid, sendername, sizeof(sendername));
                MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Vocк ligou seu laptop, e se conectou a sua Agкncia.");
                MSGPLAYER(playerid, COLOR_WHITE, "[=-=-=(LapTop)=-=-=]");
                MSGPLAYER(playerid, COLOR_YELLOW2, "|");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - Noticias");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - Contratos");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - DarCont");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - Pedido");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - Membros");
                MSGPLAYER(playerid, COLOR_YELLOW2, "| - Sair");
                MSGPLAYER(playerid, COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=)00:00|");
                ConnectedToPC[playerid] = 255;
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GREY, "   Vocк nгo й um Assasino!");
                return 1;
            }
        }
        return 1;
    }
C:\Documents and Settings\familia mr\Desktop\'\GM\BPL\gamemodes\BPL.pwn(48576) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright © 1997-2006, ITB CompuPhase

Header size:          12724 bytes
Code size:          2589824 bytes
Data size:          3270580 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 5889512 bytes

1 Warning.



Re: Warning - Jason` - 11.10.2012

Indenta o cуdigo.


Re: Warning - Life Advanced - 11.10.2012

Vocк nгo coloco a linha do warning :

PHP код:
//Topo do GM 

#pragma tabsize 0 



Re: Warning - .FuneraL. - 11.10.2012

Quote:
Originally Posted by Life Advanced
Посмотреть сообщение
Vocк nгo coloco a linha do warning :

PHP код:
//Topo do GM 
#pragma tabsize 0 
Isso nгo й recomendado, coloque no topo do GM para sair o aviso de stack/heap:
Код:
#pragma dynamic 65535
E Idente seu Cуdigo



Re: Warning - felipe_mr - 11.10.2012

pawn Код:
C:\Documents and Settings\familia mr\Desktop\'\GM\BPL\gamemodes\BPL.pwn(48577) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright © 1997-2006, ITB CompuPhase


1 Warning.

//Linha do erro:
        return 1;