Crash durch float

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
  • Guten tag!


    In letzter Zeit crasht mein Server durch folgende Fehlemerldung von crashedetect:


    [18:44:10] [debug] Run time error 4: "Array index out of bounds"
    [18:44:10] [debug] Accessing element at index 115 past array upper bound 74
    [18:44:10] [debug] AMX backtrace:
    [18:44:10] [debug] #0 00094160 in dcmd_d (playerid=115, params[]=@0x00000076 "", ... <27 variable arguments>) at C:\Users\Kevin\Desktop\TNS Reallife\gamemodes\tns.pwn:9503
    [18:44:10] [debug] #1 00000061 in Float:operator*(Float:,_:) (Float:oper1=0.00000, oper2=109, ... <23 variable arguments>) at C:\Users\Kevin\Desktop\TNS Reallife\pawno\include\float.inc:112


    Ich weiß weder warum, noch wie. Meine User können mir leider auch nichts berichten.


    Kann mir jemand helfen?


    MFG,
    Scriptor!

  • Der Befehl ist aber ein Chat :O



    dcmd_d(playerid,params[])
    {
    if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GRAU, "Du bist gemuted!");
    if(IsGefesselt[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAU, "Da du gefesselt bist, kommst du nicht an dein Funkgerät ran!");
    new text[84], string[128];
    if(sscanf(params,"s",text))
    {
    SendClientMessage(playerid,COLOR_GRAU,"Benutze: /department [Text]");
    return 1;
    }
    if(SEKDuty[playerid] == 1)
    {
    if(PlayerInfo[playerid][pSEKLevel] == 1) { format(string, sizeof(string), "SEK Insctructor %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pSEKLevel] == 2) { format(string, sizeof(string), "SEK Operator %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pSEKLevel] == 3) { format(string, sizeof(string), "SEK Sub Kommander %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pSEKLevel] == 4) { format(string, sizeof(string), "SEK Kommander %s: %s, over.", PlayerInfo[playerid][pName], text); }
    SendRadioMessage(1, COLOR_DEPARTMENT, string);
    SendRadioMessage(2, COLOR_DEPARTMENT, string);
    SendRadioMessage(3, COLOR_DEPARTMENT, string);
    SendRadioMessage(4, COLOR_DEPARTMENT, string);
    SendRadioMessage(5, COLOR_DEPARTMENT, string);
    SendRadioMessage(6, COLOR_DEPARTMENT, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    if(PlayerInfo[playerid][pRang] == 1) { format(string, sizeof(string), "Cadet %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 2) { format(string, sizeof(string), "Officer %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 3) { format(string, sizeof(string), "Sergeant %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 4) { format(string, sizeof(string), "Lieutenannt %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 5) { format(string, sizeof(string), "Captain %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 6) { format(string, sizeof(string), "Chief %s: %s, over.", PlayerInfo[playerid][pName], text); }
    SendRadioMessage(1, COLOR_DEPARTMENT, string);
    SendRadioMessage(2, COLOR_DEPARTMENT, string);
    SendRadioMessage(3, COLOR_DEPARTMENT, string);
    SendRadioMessage(4, COLOR_DEPARTMENT, string);
    SendRadioMessage(5, COLOR_DEPARTMENT, string);
    SendRadioMessage(6, COLOR_DEPARTMENT, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
    {
    if(PlayerInfo[playerid][pRang] == 1) { format(string, sizeof(string), "Praktikant %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 2) { format(string, sizeof(string), "Rettungshelfer %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 3) { format(string, sizeof(string), "Rettungssanitäter %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 4) { format(string, sizeof(string), "Notarzt %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 5) { format(string, sizeof(string), "Oberarzt %s: %s, over.", PlayerInfo[playerid][pName], text); }
    else if(PlayerInfo[playerid][pRang] == 6) { format(string, sizeof(string), "Chefarzt %s: %s, over.", PlayerInfo[playerid][pName], text); }
    SendRadioMessage(1, COLOR_DEPARTMENT, string);
    SendRadioMessage(2, COLOR_DEPARTMENT, string);
    SendRadioMessage(3, COLOR_DEPARTMENT, string);
    SendRadioMessage(4, COLOR_DEPARTMENT, string);
    SendRadioMessage(5, COLOR_DEPARTMENT, string);
    SendRadioMessage(6, COLOR_DEPARTMENT, string);
    return 1;
    }
    else return SendClientMessage(playerid, COLOR_GRAU, "Du bist kein Mitglieds des Department Teams!");
    }


    Die Zeile liegt aber bei einem ganz anderen befehl...



    dcmd_scheinezeigen(playerid,params[])
    {
    new giveplayerid, text[9][64], string[1048];
    if(sscanf(params,"d",giveplayerid))
    {
    SendClientMessage(playerid,COLOR_GRAU,"Benutze: /scheinezeigen [Spieler ID]");
    return 1;
    }
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GRAU, "Unbekannte Spieler ID!");
    if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GRAU, "Um deine Licensen einzusehen, Tippe /scheine!");
    if(!ProxDetectorS(5, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_GRAU, "Dieser Spieler ist nicht in deiner Nähe!");
    format(string, sizeof(string), "|________________Scheine von %s________________|", PlayerInfo[playerid][pName]);
    SendClientMessage(giveplayerid, COLOR_BLUE, string);
    if(PlayerInfo[playerid][pAutoLic]) { text[0] = "{58FA58}Vorhanden"; } else { text[0] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pBikeLic]) { text[1] = "{58FA58}Vorhanden"; } else { text[1] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pFlugLic]) { text[2] = "{58FA58}Vorhanden"; } else { text[2] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pBootLic]) { text[3] = "{58FA58}Vorhanden"; } else { text[3] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pLKWLic]) { text[4] = "{58FA58}Vorhanden"; } else { text[4] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pWaffenLic]) { text[5] = "{58FA58}Vorhanden"; } else { text[5] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pPassportLS]) { text[6] = "{58FA58}Vorhanden"; } else { text[6] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pPassportSF]) { text[7] = "{58FA58}Vorhanden"; } else { text[7] = "{FE2E2E}Nicht Vorhanden"; }
    if(PlayerInfo[playerid][pPassportLV]) { text[8] = "{58FA58}Vorhanden"; } else { text[8] = "{FE2E2E}Nicht Vorhanden"; }
    format(string, sizeof(string), "{FFFFFF}Führerschein: %s {FFFFFF}| Motorradschein: %s", text[0], text[1]);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "{FFFFFF}Flugschein %s {FFFFFF}| Bootschein: %s", text[2], text[3]);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "{FFFFFF}LKW Schein: %s {FFFFFF}| Waffenschein: %s", text[4], text[5]); //Zeile 9503
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "{FFFFFF}Los Santos Pass: %s", text[6]);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "{FFFFFF}San Fierro Pass: %s", text[7]);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "{FFFFFF}Las Venturas Pass: %s", text[8]);
    SendClientMessage(giveplayerid, COLOR_WHITE, string);
    format(string, sizeof(string), "%s hat %s seine Scheine gezeigt", PlayerInfo[playerid][pName], PlayerInfo[giveplayerid][pName]);
    ProxDetector(15.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
    return 1;
    }


    Mhhh :D