Run time error 20: "Invalid index paramter (bad entry point)"

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
  • Hallo,
    ich kriege bei jedem Server start zwei mal die Meldung: [debug] Run time error 20: "Invalid index parameter (bad entry point)"
    Ich habe auch schon selbst hier gesucht und ich habe in meinem Script main () { } aber ich kriege den Fehler trotzdem.
    Der Fehler wird auch immer einmal in die Konsole geschrieben wenn sich jemand mit dem Server verbindet, wie kann ich das beheben?
    Der Fehler kommt auch wenn jemand stirbt.


    //PUSH


  • public OnPlayerDeath(playerid, killerid, reason)
    {
    if(reason == 255) reason = 53;
    new iString[180];



    //antide
    if(reason == 54 && Player[playerid][LastHitWith] != -1 && Player[playerid][LastHitBy] != -1)
    {
    new weap, killahid;
    weap = Player[playerid][LastHitWith];
    killahid = Player[playerid][LastHitBy];



    SendDeathMessage(killahid, playerid, weap);



    GiveDeath(playerid);
    GiveScore(killahid, 1 * Player[killerid][Spree]);
    GiveKill(killahid);
    GiveWKill(killahid, weap);
    CheckRewards(killahid);



    Player[killahid][Spree]++;



    Player[playerid][LastHitWith] = -1;
    Player[playerid][LastHitBy] = -1;
    Player[killahid][LastKilled] = playerid;
    }
    //antide



    if(killerid == INVALID_PLAYER_ID)
    {
    SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
    GiveDeath(playerid);
    }



    else if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid))
    {
    format(iString, sizeof(iString), "%sDu hast %s%s gekillt", TDColor[Player[killerid][Team]], TDColor[Player[playerid][Team]], Player[playerid][Name]);
    PlayerTextDrawSetString(killerid, DeathText[0], iString);
    PlayerTextDrawShow(killerid, DeathText[0]);



    format(iString, sizeof(iString), "%sDu wurdest von %s%s gekillt", TDColor[Player[playerid][Team]], TDColor[Player[killerid][Team]], Player[killerid][Name]);
    PlayerTextDrawSetString(playerid, DeathText[1], iString);
    PlayerTextDrawShow(playerid, DeathText[1]);



    SetTimerEx("DeathMessage", 4000, false, "ii", killerid, playerid);



    SendDeathMessage(killerid, playerid, reason);



    if(reason == 0 || reason == 24 || reason == 25 || reason == 27 || reason == 29 || reason == 30 || reason == 31 || reason == 33 || reason == 34 || reason == 51) GiveWKill(killerid, reason);



    GiveKill(killerid);
    GiveDeath(playerid);
    Player[killerid][Spree]++;
    GiveScore(killerid, 1 * Player[killerid][Spree]);



    switch(Player[killerid][Spree])
    {
    case 2: ShowAnn2(killerid, "DOPPEL KILL!");
    case 3: ShowAnn2(killerid, "DREIFACH KILL!");
    case 4: ShowAnn2(killerid, "VIERFACH KILL!");
    case 5: ShowAnn2(killerid, "PENTA KILL!");
    case 6: ShowAnn2(killerid, "MEGA KILL!");
    case 7: ShowAnn2(killerid, "ULTRA KILL!");
    case 8: ShowAnn2(killerid, "UNAUFHALTSAM!");
    case 9: ShowAnn2(killerid, "GOETTLICH!");
    case 10 .. 200:
    {
    format(iString, sizeof(iString), "HEILIGE SCHEIßE!~n~%s%s %d KILLS!", TDColor[Player[killerid][Team]], Player[killerid][Name], Player[killerid][Spree]);
    ShowAnn2(killerid, iString);
    }
    }



    switch(Player[killerid][Team])
    {
    case GREENTEAM: GKills++;
    case BLUETEAM: BKills++;
    }



    if( Player[killerid][SniperK] == 5 || Player[killerid][SniperK] == 25 || Player[killerid][SniperK] == 50 ||
    Player[killerid][SniperK] == 100 || Player[killerid][SniperK] == 150 || Player[killerid][SniperK] == 200 ||
    Player[killerid][SniperK] == 250 || Player[killerid][SniperK] == 300 || Player[killerid][SniperK] == 350 ||
    Player[killerid][SniperK] == 400 || Player[killerid][SniperK] == 450 || Player[killerid][SniperK] == 499 )
    {
    format(iString, sizeof(iString), "Scharfschuetze~n~~n~%d / 500 Sniper Kills", Player[killerid][DeagleK]);
    ShowAch(killerid, iString, Player[killerid][SniperK], 500);
    }



    if( Player[killerid][DeagleK] == 5 || Player[killerid][DeagleK] == 25 || Player[killerid][DeagleK] == 50 ||
    Player[killerid][DeagleK] == 75 || Player[killerid][DeagleK] == 100 || Player[killerid][DeagleK] == 125 ||
    Player[killerid][DeagleK] == 150 || Player[killerid][DeagleK] == 175 || Player[killerid][DeagleK] == 200 ||
    Player[killerid][DeagleK] == 225 || Player[killerid][DeagleK] == 249 )
    {
    format(iString, sizeof(iString), "Deagle Experte~n~~n~%d / 250 Deagle Kills", Player[killerid][DeagleK]);
    ShowAch(killerid, iString, Player[killerid][DeagleK], 250);
    }



    if( Player[killerid][ShotgunK] == 5 || Player[killerid][ShotgunK] == 50 || Player[killerid][ShotgunK] == 100 ||
    Player[killerid][ShotgunK] == 150 || Player[killerid][ShotgunK] == 200 || Player[killerid][ShotgunK] == 250 ||
    Player[killerid][ShotgunK] == 300 || Player[killerid][ShotgunK] == 350 || Player[killerid][ShotgunK] == 400 ||
    Player[killerid][ShotgunK] == 450 || Player[killerid][ShotgunK] == 500 || Player[killerid][ShotgunK] == 550 ||
    Player[killerid][ShotgunK] == 600 || Player[killerid][ShotgunK] == 650 || Player[killerid][ShotgunK] == 700 ||
    Player[killerid][ShotgunK] == 750 || Player[killerid][ShotgunK] == 800 || Player[killerid][ShotgunK] == 850 ||
    Player[killerid][ShotgunK] == 900 || Player[killerid][ShotgunK] == 950 || Player[killerid][ShotgunK] == 999 )
    {
    format(iString, sizeof(iString), "Shotgun Experte~n~~n~%d / 1000 Shotgun Kills", Player[killerid][ShotgunK]);
    ShowAch(killerid, iString, Player[killerid][ShotgunK], 1000);
    }



    if( Player[killerid][RifleK] == 5 || Player[killerid][RifleK] == 25 || Player[killerid][RifleK] == 50 ||
    Player[killerid][RifleK] == 75 || Player[killerid][RifleK] == 100 || Player[killerid][RifleK] == 125 ||
    Player[killerid][RifleK] == 150 || Player[killerid][RifleK] == 175 || Player[killerid][RifleK] == 200 ||
    Player[killerid][RifleK] == 225 || Player[killerid][RifleK] == 249 )
    {
    format(iString, sizeof(iString), "Rilfe Experte~n~~n~%d / 250 Rifle Kills", Player[killerid][RifleK]);
    ShowAch(killerid, iString, Player[killerid][RifleK], 250);
    }



    if( Player[killerid][MP5K] == 5 || Player[killerid][MP5K] == 10 || Player[killerid][MP5K] == 15 ||
    Player[killerid][MP5K] == 20 || Player[killerid][MP5K] == 25 || Player[killerid][MP5K] == 30 ||
    Player[killerid][MP5K] == 35 || Player[killerid][MP5K] == 40 || Player[killerid][MP5K] == 45 ||
    Player[killerid][MP5K] == 49 )
    {
    format(iString, sizeof(iString), "MP5 Experte~n~~n~%d / 50 MP5 Kills", Player[killerid][MP5K]);
    ShowAch(killerid, iString, Player[killerid][MP5K], 50);
    }



    if( Player[killerid][AK47K] == 5 || Player[killerid][AK47K] == 10 || Player[killerid][AK47K] == 20 ||
    Player[killerid][AK47K] == 30 || Player[killerid][AK47K] == 40 || Player[killerid][AK47K] == 50 ||
    Player[killerid][AK47K] == 60 || Player[killerid][AK47K] == 70 || Player[killerid][AK47K] == 80 ||
    Player[killerid][AK47K] == 90 || Player[killerid][AK47K] == 99 )
    {
    format(iString, sizeof(iString), "AK47 Experte~n~~n~%d / 100 AK47 Kills", Player[killerid][AK47K]);
    ShowAch(killerid, iString, Player[killerid][AK47K], 100);
    }



    if( Player[killerid][M4K] == 5 || Player[killerid][M4K] == 25 || Player[killerid][M4K] == 50 ||
    Player[killerid][M4K] == 75 || Player[killerid][M4K] == 100 || Player[killerid][M4K] == 125 ||
    Player[killerid][M4K] == 150 || Player[killerid][M4K] == 175 || Player[killerid][M4K] == 200 ||
    Player[killerid][M4K] == 225 || Player[killerid][M4K] == 249 )
    {
    format(iString, sizeof(iString), "M4 Experte~n~~n~%d / 250 M4 Kills", Player[killerid][M4K]);
    ShowAch(killerid, iString, Player[killerid][M4K], 250);
    }



    if( Player[killerid][Headshots] == 5 || Player[killerid][Headshots] == 10 || Player[killerid][Headshots] == 15 ||
    Player[killerid][Headshots] == 20 || Player[killerid][Headshots] == 25 || Player[killerid][Headshots] == 30 ||
    Player[killerid][Headshots] == 35 || Player[killerid][Headshots] == 40 || Player[killerid][Headshots] == 45 ||
    Player[killerid][Headshots] == 49 )
    {
    format(iString, sizeof(iString), "Der Kopfsucher~n~~n~%d / 50 Headshots", Player[killerid][Headshots]);
    ShowAch(killerid, iString, Player[killerid][Headshots], 50);
    }



    if( Player[killerid][GrenadeK] == 5 || Player[killerid][GrenadeK] == 10 || Player[killerid][GrenadeK] == 15 ||
    Player[killerid][GrenadeK] == 20 || Player[killerid][GrenadeK] == 25 || Player[killerid][GrenadeK] == 30 ||
    Player[killerid][GrenadeK] == 35 || Player[killerid][GrenadeK] == 40 || Player[killerid][GrenadeK] == 45 ||
    Player[killerid][GrenadeK] == 49 )
    {
    format(iString, sizeof(iString), "BOOM~n~~n~%d / 50 Grenade Kills", Player[killerid][MP5K]);
    ShowAch(killerid, iString, Player[killerid][GrenadeK], 50);
    }



    if(Player[killerid][SniperK] == 500 && Player[killerid][UnlockedEagleEye] == false)
    {
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~Scharfschuetze~n~%d / 500 Sniper Kills", Player[killerid][SniperK]);
    ShowAch(killerid, iString, Player[killerid][SniperK], 500);
    }
    if(Player[killerid][DeagleK] == 250 && Player[killerid][UnlockedMP5] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "MP5 freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~Deagle Experte~n~%d / 250 Deagle Kills~n~MP5 freigeschaltet! Du kannst sie mit /guns ausruesten.", Player[killerid][DeagleK]);
    ShowAch(killerid, iString, Player[killerid][DeagleK], 250);
    }
    if(Player[killerid][ShotgunK] == 1000 && Player[killerid][UnlockedSpas] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "Spas freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~Shotgun Experte~n~%d / 1000 Shotgun Kills~n~Spas freigeschaltet! Du kannst sie mit /guns ausruesten.", Player[killerid][ShotgunK]);
    ShowAch(killerid, iString, Player[killerid][ShotgunK], 1000);
    }
    if(Player[killerid][RifleK] == 250 && Player[killerid][UnlockedSniper] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "Sniper freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~Riflee Experte~n~%d / 250 Rifle Kills~n~Sniper freigeschaltet! Du kannst sie mit /guns ausruesten.", Player[killerid][RifleK]);
    ShowAch(killerid, iString, Player[killerid][RifleK], 250);
    }
    if(Player[killerid][MP5K] == 50 && Player[killerid][UnlockedAK47] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "AK47 freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~MP5 Experte~n~%d / 50 MP5 Kills~n~AK47 freigeschaltet! Du kannst sie mit /guns ausruesten.", Player[killerid][MP5K]);
    ShowAch(killerid, iString, Player[killerid][MP5K], 50);
    }
    if(Player[killerid][AK47K] == 100 && Player[killerid][UnlockedM4] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "M4 freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~AK47 Experte~n~%d / 100 AK47 Kills~n~M4 freigeschaltet! Du kannst sie in /guns ausruesten.", Player[killerid][AK47K]);
    ShowAch(killerid, iString, Player[killerid][AK47K], 100);
    }
    if(Player[killerid][M4K] == 250 && Player[killerid][UnlockedGrenade] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "Granate freigeschaltet! Nutze {FFFFFF}/guns {FFFF00}um sie zu benutzen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~M4 Experte~n~%d / 250 M4 Kills~n~Granate freigeschaltet! Du kannst sie in /guns ausruesten.", Player[killerid][M4K]);
    ShowAch(killerid, iString, Player[killerid][M4K], 250);
    }
    if(Player[killerid][Headshots] == 50 && Player[killerid][UnlockedCigar] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "Zigarre freigeschaltet! Du wirst mit einer Zigarre das nächste mal spawnen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~Der Kopfsucher~n~%d / 50 Headshots~n~Du spawnst jetzt mit einer Zigarre!", Player[killerid][Headshots]);
    ShowAch(killerid, iString, Player[killerid][Headshots], 50);
    }
    if(Player[killerid][GrenadeK] == 50 && Player[killerid][UnlockedFlame] == false)
    {
    SendClientMessage(killerid, YELLOW_COLOR, "Flammen Schädel freigeschaltet! Du wirst mit einem Flammenschädel das nächste mal spawnen");
    PlayerPlaySound(killerid, 1133, 0, 0, 0);
    format(iString, sizeof(iString), "~g~~h~~h~~h~Errungenschaft erhalten!~n~~n~~g~~h~~h~~h~BOOM~n~%d / 50 Grenade Kills~n~Du spawnst jetzt mit einem Flammenschädel!", Player[killerid][MP5K]);
    ShowAch(killerid, iString, Player[killerid][GrenadeK], 50);
    }

    CheckRewards(killerid);
    }

    Player[playerid][LastHitWith] = -1; //antide
    Player[playerid][LastHitBy] = -1; //antide
    Player[playerid][Spree] = 0;
    Player[killerid][LastKilled] = playerid;



    return 1;
    }