[HILFE]Script compilet mit 5 Warnings, jedoch stürzt der Server immer ab...[HILFE]

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Okay also der Compiler-Output:


    C:\Users\Martin\Desktop\pawno\include\M_Bot.inc(615) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
    C:\Users\Martin\Desktop\pawno\XUS.pwn(6402) : warning 225: unreachable code
    C:\Users\Martin\Desktop\pawno\XUS.pwn(34753) : warning 219: local variable "str" shadows a variable at a preceding level
    C:\Users\Martin\Desktop\pawno\XUS.pwn(65182) : warning 217: loose indentation
    C:\Users\Martin\Desktop\pawno\XUS.pwn(67091) : warning 203: symbol is never used: "strtock1"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Header size: 14312 bytes
    Code size: 3569252 bytes
    Data size: 8290088 bytes
    Stack/heap size: 32768 bytes; estimated max. usage: unknown, due to recursion
    Total requirements:11906420 bytes


    5 Warnings.


    So Nun die Zeilen:


    warning 225: unreachable code
    if(IsAGangmember(playerid != 0)
    )
    {
    GangZoneShowForPlayer(playerid, Gangzone1, GangColor[Gangzoneowner1][1]);
    GangZoneShowForPlayer(playerid, Gangzone2, GangColor[Gangzoneowner2][1]);
    GangZoneShowForPlayer(playerid, Gangzone3, GangColor[Gangzoneowner3][1]);
    GangZoneShowForPlayer(playerid, Gangzone4, GangColor[Gangzoneowner4][1]);
    GangZoneShowForPlayer(playerid, Gangzone5, GangColor[Gangzoneowner5][1]);
    GangZoneShowForPlayer(playerid, Gangzone6, GangColor[Gangzoneowner6][1]);
    GangZoneShowForPlayer(playerid, Gangzone7, GangColor[Gangzoneowner7][1]);
    GangZoneShowForPlayer(playerid, Gangzone8, GangColor[Gangzoneowner8][1]);
    GangZoneShowForPlayer(playerid, Gangzone9, GangColor[Gangzoneowner9][1]);
    new GangVar;
    if(PlayerInfo[playerid][pMember] != 0)
    {
    if(PlayerInfo[playerid][pMember] == GangInfo1){GangVar=1;}
    if(PlayerInfo[playerid][pMember] == GangInfo2){GangVar=2;}
    if(PlayerInfo[playerid][pMember] == GangInfo3){GangVar=3;}
    if(PlayerInfo[playerid][pMember] == GangInfo4){GangVar=4;}
    if(PlayerInfo[playerid][pMember] == GangInfo5){GangVar=5;}
    if(PlayerInfo[playerid][pMember] == GangInfo6){GangVar=6;}
    if(PlayerInfo[playerid][pMember] == GangInfo7){GangVar=7;}
    if(PlayerInfo[playerid][pMember] == GangInfo8){GangVar=8;}
    if(PlayerInfo[playerid][pMember] == GangInfo9){GangVar=9;}
    }
    else
    {
    if(PlayerInfo[playerid][pLeader] == GangInfo1){GangVar=1;}
    if(PlayerInfo[playerid][pLeader] == GangInfo2){GangVar=2;}
    if(PlayerInfo[playerid][pLeader] == GangInfo3){GangVar=3;}
    if(PlayerInfo[playerid][pLeader] == GangInfo4){GangVar=4;}
    if(PlayerInfo[playerid][pLeader] == GangInfo5){GangVar=5;}
    if(PlayerInfo[playerid][pLeader] == GangInfo6){GangVar=6;}
    if(PlayerInfo[playerid][pLeader] == GangInfo7){GangVar=7;}
    if(PlayerInfo[playerid][pLeader] == GangInfo8){GangVar=8;}
    if(PlayerInfo[playerid][pLeader] == GangInfo9){GangVar=9;}
    }
    new GangCounterText[256];
    format(GangCounterText,sizeof(GangCounterText),"%s Punkte: %d ° %s Punkte: %d",GangNames[GangVar],GangPoints[GangVar],"Kein Gegner",0);
    GangPointsAnzeiger[playerid] = TextDrawCreate(200.000000,400.000000,GangCounterText);
    TextDrawAlignment(GangPointsAnzeiger[playerid],0);
    TextDrawBackgroundColor(GangPointsAnzeiger[playerid],0x000000ff);
    TextDrawFont(GangPointsAnzeiger[playerid],1);
    TextDrawLetterSize(GangPointsAnzeiger[playerid],0.499999,1.300000);
    TextDrawColor(GangPointsAnzeiger[playerid],0xFF0000FF);
    TextDrawSetOutline(GangPointsAnzeiger[playerid],1);
    TextDrawSetProportional(GangPointsAnzeiger[playerid],1);
    TextDrawSetShadow(GangPointsAnzeiger[playerid],3);
    TextDrawShowForPlayer(playerid, GangPointsAnzeiger[playerid]);
    }
    }


    warning 219: local variable "str" shadows a variable at a preceding level
    if(!strcmp(cmdtext, "/AFK", true))
    {
    if(IsPlayerConnected(playerid))
    {
    if(SpielerIstAFK[playerid] == false)
    {
    //new string[228];
    new str[512];
    SpielerIstAFK[playerid] = true;
    TogglePlayerControllable(playerid,0);
    AFK3DTextLabel[playerid] = Create3DTextLabel("Spieler ist AFK\nSekunden: 0", AFK_3DTextLabel, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(AFK3DTextLabel[playerid], playerid, 0.0, 0.0, 0.7);
    format(string,sizeof(string),"~y~AFK Status~w~: ~w~Aktiviert~n~~y~Sekunden~w~: 0");
    TextDrawSetString(Textdraw0[playerid], string);
    TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
    TextDrawShowForPlayer(playerid,TextAFK);
    IsAFK[playerid] = 1;
    SetPlayerHealth(playerid,100);
    TextDrawUpdate[playerid] = SetTimerEx("AFKTextDraw", 1000, 1, "i", playerid);
    SendClientMessage(playerid,COLOR_GREEN,"Du hast dich in den AFK-Modus begeben!");
    format(str, sizeof(str), "** %s ist AFK. **",sendername);
    SendClientMessageToAll(0xF0F0F0FF, str);
    SendClientMessage(playerid,0xFF1E00FF,"um AFK wieder Zu verlassen nutze /back");
    }
    else
    {
    SendClientMessage(playerid,COLOR_LIGHTRED,"Du befindest dich schon im AFK-Modus Nutze /back!");
    return 1;
    }
    }
    return 1;
    }


    warning 217: loose indentation
    stock IsPlayerInWater(playerid)
    {
    new Float:X, Float:Y, Float:Z, an = GetPlayerAnimationIndex(playerid);
    GetPlayerPos(playerid, X, Y, Z);
    if((1544 >= an >= 1538 || an == 1062 || an == 1250) && (Z <= 0 || (Z <= 41.0 && IsPlayerInArea(playerid, -1387, -473, 2025, 2824))) ||
    (1544 >= an >= 1538 || an == 1062 || an == 1250) && (Z <= 2 || (Z <= 39.0 && IsPlayerInArea(playerid, -1387, -473, 2025, 2824))))
    {
    return 1;
    }
    return 0;
    }


    SO DA HABT IHR SIE ;)