Jump to content
  • 0

2 warninguri


GiGiMuScHi

Question

Am 2 warninguri si nu stiu cum sa scap de ele:

C:\Documents and Settings\Administrator\Desktop\in lucru\eGamer.pwn(1618) : warning 235: public function lacks forward declaration (symbol "ResetReport")

C:\Documents and Settings\Administrator\Desktop\in lucru\eGamer.pwn(16562) : warning 219: local variable "id" shadows a variable at a preceding level

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size:          11020 bytes

Code size:          2122128 bytes

Data size:          6978364 bytes

Stack/heap size:      16384 bytes; estimated max. usage=5184 cells (20736 bytes)

Total requirements: 9127896 bytes

2 Warnings.

Linia 1618:

public ResetReport(playerid)//

Toata comanda la public ResetReport(playerid)//:

public ResetReport(playerid)//

{

PlayerReported[playerid] = 0;

}

Linia 16562:

new id;

Acest    new id; este de la comanda /cr.

Uitati comanda /cr.

//-----------------[Call-Report]--------------------------------

    if(strcmp(cmd, "/callreport", true) == 0 || strcmp(cmd, "/cr", true) == 0)

{

new id;

tmp = strtok(cmdtext, idx);

if (strlen(tmp))

{

id = strval(tmp);

            if (IsPlayerConnected(id))

    {

  if(admind[playerid] == 0 && adminafk[playerid] == 1)

            {

            SendClientMessage(playerid, COLOR_2RED, "Nu Poti raspunde la report daca stai AFK si OFF Duty.");

            return 0;

            }

  if(admind[playerid] == 0)

            {

            SendClientMessage(playerid, COLOR_2RED, "Nu Poti raspunde la report daca stai OFF Duty.");

            return 0;

            }

              if(PlayerInfo[playerid][pAdmin] >= 1)

  {

if(CallReport[id] == 1)

{

                    CallReport[id] = 0;

                    GetPlayerName(id, giveplayer, sizeof(giveplayer));

        GetPlayerName(playerid, sendername, sizeof(sendername));

                    format(string, sizeof(string), "~g~Admin ~y~%s ~g~ti-a preluat Reportul.", sendername);

                    GameTextForPlayer(id,string,2300,3);

                    format(string, sizeof(string), "[REPORT INFO]:Admin %s ti-a preluat reportul. El va da goto la tine cat de curand.", sendername);

                    SendClientMessage(id,0x0080FFFF,string);

                    for(new i = 0; i < MAX_PLAYERS; i ++)

        {

            if(PlayerInfo[pAdmin] >= 1)

            {

                      format(string, sizeof(string), "[iNFO]: Admin %s a preluat reportul lui %s . Doar el se va ocupa de acest player!", sendername ,giveplayer);

              SendClientMessage(i,0x00FFFFFF,string);

            }

            }

                    return 1;

              }

              else

              {

SendClientMessage(playerid,COLOR_GREY,"Playerul nu a dat /report !");

  }

}

else

{

  SendClientMessage(playerid,COLOR_GREY,"Nu esti admin !");

}

  }

            else

            {

  SendClientMessage(playerid, COLOR_GREY, "Player negasit");

            }

        }

        else

        {

SendClientMessage(playerid, COLOR_GREY, "Folosire: /callreport [playerid/name]");

        }

}

Ma puteti ajuta?

Respecta Si Vei Fi Respectat !!!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Pentru prima:

Deasupra liniei 1618 adaug? asta:

forward ResetReport(playerid);
Pentru a doua inlocuie?te tot cu codul de mai jos:
    if(strcmp(cmd, "/callreport", true) == 0 || strcmp(cmd, "/cr", true) == 0)
   {
      new idcall;
      tmp = strtok(cmdtext, idx);
      if (strlen(tmp))
      {
         idcall = strval(tmp);
            if (IsPlayerConnected(idcall))
          {
            if(admind[playerid] == 0 && adminafk[playerid] == 1)
            {
            SendClientMessage(playerid, COLOR_2RED, "Nu Poti raspunde la report daca stai AFK si OFF Duty.");
            return 0;
            }
            if(admind[playerid] == 0)
            {
            SendClientMessage(playerid, COLOR_2RED, "Nu Poti raspunde la report daca stai OFF Duty.");
            return 0;
            }
              if(PlayerInfo[playerid][pAdmin] >= 1)
           {
            if(CallReport[idcall] == 1)
            {
                     CallReport[idcall] = 0;
                     GetPlayerName(idcall, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                     format(string, sizeof(string), "~g~Admin ~y~%s ~g~ti-a preluat Reportul.", sendername);
                     GameTextForPlayer(idcall,string,2300,3);
                     format(string, sizeof(string), "[REPORT INFO]:Admin %s ti-a preluat reportul. El va da goto la tine cat de curand.", sendername);
                     SendClientMessage(idcall,0x0080FFFF,string);
                     for(new i = 0; i < MAX_PLAYERS; i ++)
                  {
                   if(PlayerInfo[pAdmin] >= 1)
                   {
                      format(string, sizeof(string), "[INFO]: Admin %s a preluat reportul lui %s . Doar el se va ocupa de acest player!", sendername ,giveplayer);
                    SendClientMessage(i,0x00FFFFFF,string);
                   }
                   }
                     return 1;
               }
               else
               {
             SendClientMessage(playerid,COLOR_GREY,"Playerul nu a dat /report !");
            }
          }
          else
          {
            SendClientMessage(playerid,COLOR_GREY,"Nu esti admin !");
          }
         }
            else
            {
           SendClientMessage(playerid, COLOR_GREY, "Player negasit");
            }
        }
        else
        {
         SendClientMessage(playerid, COLOR_GREY, "Folosire: /callreport [playerid/name]");
        }
   }

Ar trebui s? mearg?.

qdbjz10.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.