GarHouse V2.0 crashes server
#1

Hello everyone.

I added GarHouse V2.0 to my server and when someone connects to the server it just crashes it.

Here's what CrashDetect found.

Код:
[02:50:46] [debug] Server crashed while executing GarHouse.amx
[02:50:46] [debug] Backtrace (most recent call first):
[02:50:46] [debug] #0  ???????? in main () at C:\Users\John\Desktop\Script\filterscripts\GarHouse.pwn:3524
So I went to line 3524 in the script and this is what it was.

pawn Код:
return 1;
}
The whole code for this is...
pawn Код:
stock SecurityDog_Bite(playerid, houseid, type, failed = 0)
{
    if(hInfo[houseid][HouseDog] == 0) return 1;
    new Float:health;
    GetPlayerHealth(playerid, health);
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    if((health - (SECURITYDOG_HEALTHLOSS * SECURITYDOG_BITS)) <= 0.00)
    {
        SetPlayerHealth(playerid, 0.00);
        switch(type)
        {
            case 0: ShowInfoBoxEx(playerid, COLOUR_SYSTEM, HBREAKIN_FAILED1);
            case 1: ShowInfoBoxEx(playerid, COLOUR_SYSTEM, HROB_FAILED1);
        }
    }
    else
    {
        SetPlayerHealth(playerid, (health - (SECURITYDOG_HEALTHLOSS * SECURITYDOG_BITS)));
        if(failed == 1)
        {
            switch(type)
            {
                case 0: ShowInfoBoxEx(playerid, COLOUR_SYSTEM, HBREAKIN_FAILED2);
                case 1: ShowInfoBoxEx(playerid, COLOUR_SYSTEM, HROB_FAILED2);
            }
        }
    }
    SetTimerEx("SecurityDog_ClearAnimations", 4000, false, "i", playerid);
    return 1;
}
So I thought it maybe something to do with the Security Dog, so I deleted everything to do with the security dog and I compiled it, reloaded it and I then got this error.

Код:
[03:16:34] [debug] Server crashed while executing GarHouse.amx
[03:16:34] [debug] Backtrace (most recent call first):
[03:16:34] [debug] #0  ???????? in main () at C:\Users\John\Desktop\Script\filterscripts\GarHouse.pwn:3467
Line 3467 is this:
pawn Код:
return 1;
}
The whole code for this was...
pawn Код:
stock EndHouseRobbery(playerid)
{
    new timer_state = GetPVarInt(playerid, "HouseRobberyTimer");
    if(timer_state != -1)
    {
        KillTimer(timer_state);
        SetPVarInt(playerid, "HouseRobberyTimer", -1);
    }
    return 1;
}

So is it something to do with the Returns?

Thanks.
Reply
#2

Any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)