Jump to content

[REZOLVAT] Problema Loose Indentation


Joley
 Share

Recommended Posts

  • Username: Joley
  • Problema întălnită: (17227) : warning 217: loose indentation
    (17254) : warning 217: loose indentation
  • Detalii despre problemă: - Imi da loose indetation aiurea
  • Ce ai încercat să faci înainte să postezi?: Sa asez codul, eu vad ca codul este asezat bine!
  • Cod sursă (recomandat pastebin.com) : https://pastebin.com/2WLVfRWR
  • Alte detalii: Linia 17727 este if(strlen(gString) > 120), si linia 17254 este if(HelperAnswer[x] == playerid)
Link to comment
Share on other sites

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
        SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
        }      

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

 

ETLTsrq.gif

 

       ezgif.com-video-to-gif.gif

Link to comment
Share on other sites

Acum 2 minute, DrooMAdv a spus:

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
        SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
        }      

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

 

Nu este inchisa o acolada si acum imi da si mai multe erori.

Link to comment
Share on other sites

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
      SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
    }  
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
          }  
        }
      }        

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

 

Edited by DrooMAdv

ETLTsrq.gif

 

       ezgif.com-video-to-gif.gif

Link to comment
Share on other sites

Acum 2 minute, DrooMAdv a spus:

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
        SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
    }  
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
        }
      }        

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

 

Tot asa.

Link to comment
Share on other sites

10 hours ago, Joley said:

Tot asa.

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
      SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
    }  
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
          }  
        }
      }        

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

incearca-o pe asta

ETLTsrq.gif

 

       ezgif.com-video-to-gif.gif

Link to comment
Share on other sites

Acum 2 minute, DrooMAdv a spus:

CMD:nre(playerid, params[])
{
  new message[164], nstring[164];
  if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu esti logat si nu poti sa folosesti aceasta comanda!");
  if(HelperAnswer[playerid] == -1) return SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Nu ai primit o intrebare.");
    if(sscanf(params, "s[164]", message))
    {
       SendClientMessage(playerid, COLOR_SYN,"Sintaxa:{FFFFFF} /nre <raspuns>");
       return 1;
    }

    if(PlayerInfo[playerid][pHelper] >= 1)
    {
      PlayerInfo[playerid][ pStaffPoints]++;
      Update(playerid, pStaffPointsx);
      Questions--;
      UpdateStaffTextdraw();
        
      format(gString, sizeof(gString), "(N) Helper %s: @%s, {FFFF00}%s{FFFF00}", GetName(playerid),GetName(HelperAnswer[playerid]), message);
      SendClientMessage(playerid, COLOR_NOB, gString);
      new string2[128];
    }
    if(strlen(gString) > 120)
    {
      strmid(string2, gString, 110, 256);
      strdel(gString, 110,  256);

      format(gString,128,"%s ...",gString);
      format(string2,128,"... %s",string2);
    }  
  }
    
  foreach(new x : Player)
  {
     if(NewbieEnabled[x] == 1)
     {
        format(nstring, sizeof(nstring), "(N) Jucator %s: %s", GetName(HelperAnswer[playerid]),PlayerInfo[HelperAnswer[playerid]][pNewbie]);
        SendClientMessage(x,COLOR_NOB, nstring);
        
        if(strlen(gString) > 120)
        {
          SendClientMessage(x,COLOR_NOB, gString);
          SendClientMessage(x,COLOR_NOB, string2);
        }
        else
        {
          SendClientMessage(x,COLOR_NOB, gString);
        }
          }

            if(HelperAnswer[x] == playerid)
            {
              format(PlayerInfo[x][pNewbie], 164, " ");
              HelperAnswer[x] = -1;
              HelperAnswer[playerid] = -1;
              Question[x] = 0;
            }
          }  
        }
      }        

      if(strlen(PlayerInfo[x][pNewbie]) > 1 && HelperAnswer[x] == -1)
      {
        format(gString, sizeof(gString), "(Question) %s - lvl %d: %s", GetName(x), PlayerInfo[x][pLevel], PlayerInfo[x][pNewbie]);
        SendClientMessage(playerid, COLOR_NEWBIE, gString);
        HelperAnswer[x] = playerid;
        HelperAnswer[playerid] = x;
        format(gString, sizeof(gString), "Intrebarea ta a fost atribuita helperului %s, te rugam sa astepti raspunsul acestuia.", GetName(HelperAnswer[playerid]));
        SendClientMessage(x,COLOR_NOB,gString);
        SendClientMessage(x,COLOR_NOB,"Chat-ul (/n)ewbie a fost activat automat. Dupa ce primesti un raspuns il poti dezactiva (/nonewbie)");
      }
      return 1;
    }
    else return SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX:"ALB" Nu esti autorizat sa folosesti aceasta comanda!");

    return 1;
}

incearca-o pe asta

(17209) : warning 217: loose indentation
(17224) : warning 204: symbol is assigned a value that is never used: "string2"
(17228) : error 017: undefined symbol "string2"
(17232) : error 017: undefined symbol "string2"
(17206) : warning 204: symbol is assigned a value that is never used: "nstring"
(17206 -- 17234) : warning 209: function "cmd_nre" should return a value
(17206 -- 17236) : error 010: invalid function or declaration
(17206 -- 17238) : error 010: invalid function or declaration
(17206 -- 17238) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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