coding fehler?

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
  • public OnPlayerUpdate(playerid)
    {
    if(IsPlayerNPC(playerid))return 1;


    new
    Float:antihp,
    Float:antiarm,
    Float:oldhp = OLDhealth[playerid],
    Float:oldarm = OLDarmour[playerid],
    vehicleid = GetPlayerVehicleID(playerid),
    keys,ud,lr,
    string[24];


    if(IsPlayerInAnyVehicle(playerid))
    {
    for(new i=0;i<MAX_NAGELBAENDER;i++)
    {
    if(NagelBand[i][Erstellt] == 1)
    {
    if(IsVehicleInRangeOfPoint(vehicleid,2.0,NagelBand[i][sperreX],NagelBand[i][sperreY],NagelBand[i][sperreZ]))
    {
    UpdateVehicleDamageStatus(vehicleid,0,0,0,ReifenPlatt(1,1,1,1));
    }
    }
    }
    }


    GetPlayerHealth(playerid,antihp);
    GetPlayerArmour(playerid,antiarm);


    if(oldhp == antihp)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~r~HP:%.1f",antihp);
    PlayerTextDrawSetString(playerid,HPdraw[playerid],string);
    }
    }
    if(oldhp > antihp)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~r~HP:%.1f~g~f",antihp,oldhp-antihp);
    PlayerTextDrawSetString(playerid,HPdraw[playerid],string);
    }
    }
    if(oldhp < antihp)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~r~HP:%.1f~g~",antihp,antihp-oldhp);
    PlayerTextDrawSetString(playerid,HPdraw[playerid],string);
    }
    }
    oldhp = antihp;


    if(oldarm == antiarm)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~w~R:%.1f",antiarm);
    PlayerTextDrawSetString(playerid,ARMOURdraw[playerid],string);
    }
    }
    if(oldarm > antiarm)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~w~R:%.1f~g~",antiarm,oldarm-antiarm);
    PlayerTextDrawSetString(playerid,ARMOURdraw[playerid],string);
    }
    }
    if(oldarm < antiarm)
    {
    if(Spieler[playerid][DigiHud] == 0)
    {
    format(string,sizeof(string),"~w~R:%.1f~g~",antiarm,antiarm-oldarm);
    PlayerTextDrawSetString(playerid,ARMOURdraw[playerid],string);
    }
    }
    oldarm = antiarm;


    if(noclipdata[playerid][cameramode] == CAMERA_MODE_FLY)
    {
    GetPlayerKeys(playerid,keys,ud,lr);
    if(noclipdata[playerid][mode] && (GetTickCount() - noclipdata[playerid][lastmove] > 100))
    {
    MoveCamera(playerid);
    }
    if(noclipdata[playerid][udold] != ud || noclipdata[playerid][lrold] != lr)
    {
    if((noclipdata[playerid][udold] != 0 || noclipdata[playerid][lrold] != 0) && ud == 0 && lr == 0)
    {
    StopPlayerObject(playerid,noclipdata[playerid][flyobject]);
    noclipdata[playerid][mode] = 0;
    noclipdata[playerid][accelmul] = 0.0;
    }
    else
    {
    noclipdata[playerid][mode] = GetMoveDirectionFromKeys(ud,lr);
    MoveCamera(playerid);
    }
    }
    noclipdata[playerid][udold] = ud,noclipdata[playerid][lrold] = lr;
    return 0;
    }
    return 1;
    }


    Run time error 8: "Heap underflow"
    #0 00000008 in public OnPlayerUpdate ()