Jump to content
  • 0

warning 225: unreachable code


Tican Daniel Andrei

Question

Salut, imi cer scuze de deranj,intampin si eu o problema cand incerc sa adaug la OnPlayerText,warningul 225: unreachable code, am cautat o rezolvare dar nu am gasit pe cineva care sa-mi explice de ce apare acest warning si cum s-ar putea rezolva,multumesc anticipat.

COD Sursa:

public OnPlayerText(playerid, text[])
{
    if(pInfo[playerid][mute] > gtm || uex[playerid] > gtm) return SendClientMessage(playerid, COLOR_DARKGRAY, "Ai mute, nu poti vorbi. (SAU) Poti trimite un text odata la o secunda.     (Anti-Spam)"), 0;
    uex[playerid] = gtm+1;
    //==========================================================================
    if(pInfo[playerid][pAdmin] >= 1)
    {
    SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
    }
    //==========================================================================
    if(pInfo[playerid][pMobile] < INVALID_PLAYER_ID)
    {
        format(mch, 140, "{%s}%s {FFFFFF}(phone): %s", yp[playerid], nm[playerid], text), SendAreaMessage(25.0, playerid, mch, -1);
        addlogchat(mch, playerid);
        if(pInfo[pInfo[playerid][pMobile]][pSpk] == 1) return format(MStH, 140, "(speaker) {%s}%s: {FFFFFF}%s", yp[playerid], nm[pInfo[playerid][pMobile]], text), SendAreaMessage(25.0, pInfo[playerid][pMobile], MStH, 0xFFFFFFFF), 0;
        return SendClientMessage(pInfo[playerid][pMobile], 0xFFFFFFFF, mch), 0;
    }
    format(mch, 1024, "{%s}%s: {FFFFFF}%s", yp[playerid], nm[playerid], text), GetPlayerPos(playerid, XA1,XA2,XA3), SetPlayerChatBubble(playerid, text, -1, 30.0, 5000),           SendClientMessage(playerid, -1, mch);
    foreach(new i : Player) if(IsPlayerStreamedIn(playerid, i) && IsPlayerInRangeOfPoint(i, 35, XA1, XA2, XA3)) SendClientMessage(i, -1, mch);
    addlogchat(mch, playerid);
    return 0;
    //==========================================================================
     if(strfind(text, "samp.", true) != -1 || strfind(text, "gta.", true) != -1 || // Linia 60267, eroare de tip warning 225: unreachable code
     strfind(text, "samp,", true) != -1 || strfind(text, "gta,", true) != -1 ||
     strfind(text, "s-a-m-p.", true) != -1 || strfind(text, "g-t-a.", true) != -1 ||
     strfind(text, "s-a-m-p,", true) != -1 || strfind(text, "g-t-a,", true) != -1 ||
     strfind(text, "[s][a][m][p].", true) != -1 || strfind(text, "[g][t][a].", true) != -1 ||
     strfind(text, "sampx.", true) != -1 || strfind(text, "gtax", true) != -1 ||
     strfind(text, ".ro", true) != -1 || strfind(text, ".com", true) != -1 ||
     strfind(text, ".net", true) != -1 || strfind(text, ".org", true) != -1 ||
     strfind(text, ".tk", true) != -1 ||
     strfind(text, ",ro", true) != -1 || strfind(text, ",com", true) != -1 ||
     strfind(text, ",net", true) != -1 || strfind(text, ",org", true) != -1 ||
     strfind(text, ",tk", true) != -1 ||
     strfind(text, ".-r-o", true) != -1 ||
     strfind(text, ".-c-o-m", true) != -1 || strfind(text, ".-n-e-t", true) != -1 ||
     strfind(text, ".-o-r-g", true) != -1 || strfind(text, ".-t-k", true) != -1 || strfind(text, ":7777", true) != -1)
      {
      format(AStr, 180, "(Bigears) Sender: %s - CW: %s.", nm[playerid], text),
      SendAdminBMessage(0xCC5312FF, AStr);
      }
     return 1;
    //==========================================================================
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
10 minutes ago, Banditul said:

Asta pentru ca dupa linia cu

addlogchat(mch, playerid);

Ai return 0; care iti opreste executia acolo si tot ce ai dupa acel return nu mai este executat. Sterge acel return 0

Iti multumesc mult. Daca se poate,imi poti acorda T/C? 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.