Server Crashing
#1

I'm using the plugin CrashDetector to try and find the trace but I can't seem to find the issue.
Код:
[debug] AMX backtrace:
[debug] #1 0022c2e0 in ResetPlayerWeaponsEx (playerid=2282384) at pwn:44704
[debug] #2 0012c934 in public OnPlayerCommandText (playerid=1, cmdtext[]=@0x0088d700 "rn to the base and deliver the..."):22761
[debug] Server crashed while executing script.amx
Line 44704
pawn Код:
stock ResetPlayerWeaponsEx(playerid)
{
    for(new i = 0; i < 50; i++)
    {
        Weapons[playerid][i] = 0;
    }
    return ResetPlayerWeapons(playerid); // THIS LINE TO BE EXACT.
}
Line 22761
pawn Код:
PlayerInfo[playerid][pInvWeapon] = 0;
Reply
#2

shouldnt it be:

pawn Код:
stock ResetPlayerWeaponsEx(playerid)
{
    for(new i = 0; i < 50; i++)
    {
        PlayerInfo[i][pInvWeapon] = 0;
    }
    return ResetPlayerWeapons(playerid); // THIS LINE TO BE EXACT.
}
??
Reply
#3

It has not fixed the issue.
Reply
#4

I am completely out of ideas, have tried everything and it's urgent that I get this fixed.
Reply
#5

pawn Код:
stock ResetPlayerWeaponsEx(playerid)
{
    for(new i = 0; i < 50; i++)
    {
        Weapons[playerid][i] = 0;
    }
    if(IsPlayerConnected(playerid))
    {
    return ResetPlayerWeapons(playerid); // THIS LINE TO BE EXACT.
    }
     return -1;
   
}
Reply
#6

Any other ideas to why the server would be crashing when a certain command is entered?
Reply
#7

Show us the command.
Reply
#8

pawn Код:
if(strcmp(cmd, "/acceptdeath", true) == 0)
{
    if(dying[playerid] == 1) {
        Hospitalizeds[playerid] = 0;
        dying[playerid] = 0;
        pUncountious[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerColor(playerid,TEAM_HIT_COLOR);
        TogglePlayerControllable(playerid,1);
        new rand;
        rand = random(sizeof(gRandomHospitalSpawns));
        DOO_SetPlayerPos(playerid, gRandomHospitalSpawns[rand][0], gRandomHospitalSpawns[rand][1], gRandomHospitalSpawns[rand][2]); // Warp the player
        SetPlayerFacingAngle(playerid, 270.0);
        FadePlayerScreen(playerid,COLOR_BLACK, 40);
        SetCameraBehindPlayer(playerid);
        OnePlayAnim(playerid,"INT_HOUSE","LOU_Out",4.0,0,0,0,0,0);
        SetPlayerDrunkLevel(playerid, 0);
        SetPlayerHealth(playerid, 30.0);
        Hospitalizeds[playerid] = 0;
        //Usinganim[playerid] = 0;
        ResetPlayerWeaponsEx(playerid);
        PlayerInfo[playerid][pInvWeapon] = 0;
        PlayerInfo[playerid][pInvAmmo] = 0;
        SendClientMessage(playerid, COLOR_LIGHTRED, "You have been release from the hospital.");
        SendClientMessage(playerid, COLOR_LIGHTRED, "((Remember you have lost 30 minutes of memory.))");
    }
    return 1;
}
pawn Код:
else if(PlayerDied[playerid] == 1) {
            SetTimerEx("FallPlayer", 100, 0, "d", playerid);
            SetPlayerPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
            SetPlayerInterior(playerid, DeadInt[playerid]);
            SetPlayerVirtualWorld(playerid, DeadWorld[playerid]);
            SetPlayerCameraPos(playerid, deadx[playerid], deady[playerid], deadz[playerid]+5);
            SetPlayerCameraLookAt(playerid, deadx[playerid], deady[playerid], deadz[playerid]);
            TogglePlayerControllableEx(playerid,0);
            SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded, now if a medic or anyone else doesn't save you, you will die.");
            SendClientMessage(playerid, COLOR_LIGHTRED, "To accept death type /acceptdeath.");
            pUncountious[playerid] = 1;
            gPlayerUsingLoopingAnim[playerid] = 1;
            dying[playerid] = 1;
            Usinganim[playerid] = 1;
            return 1;
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)