Amx Backtrace!
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It's not something I can do via teamviewer.

Just do what the post says and also replace
pawn Код:
cache_get_field_content(i, "id", szResult, MainPipeline); crateid = strval(szResult);
to:
pawn Код:
cache_get_field_content(i, "id", szResult, MainPipeline); crateid = strval(szResult);
printf( "crateid: %d", crateid );
I'm sure this is what causing this, crateid gets a value greater than 19, when it should get 0-19 (but it got 22 as the debug showed).

Run your server and if it gets crashed again, show us what it printed. If we make sure it's what I told you before, we'll need to prevent it. This:
pawn Код:
if(CrateInfo[crateid][InVehicle] != INVALID_VEHICLE_ID)
{
    CrateInfo[crateid][crActive] = 0;
    CrateInfo[crateid][InVehicle] = INVALID_VEHICLE_ID;
}
if(CrateInfo[crateid][crActive])
{
    CrateInfo[crateid][InVehicle] = INVALID_VEHICLE_ID;
    CrateInfo[crateid][crObject] = CreateDynamicObject(964,CrateInfo[crateid][crX],CrateInfo[crateid][crY],CrateInfo[crateid][crZ],0.00000000,0.00000000,0.00000000);
    format(string, sizeof(string), "Serial Number: #%d\n High Grade Materials: %d/50", i, CrateInfo[i][GunQuantity]);
    CrateInfo[crateid][crLabel] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, CrateInfo[crateid][crX],CrateInfo[crateid][crY],CrateInfo[crateid][crZ]+1, 20.0, _, _, 1, 0, 0, _, 20.0);
   
}
To:
pawn Код:
if( crateid > 0 && crateid < 20 )
{
    if(CrateInfo[crateid][InVehicle] != INVALID_VEHICLE_ID)
    {
        CrateInfo[crateid][crActive] = 0;
        CrateInfo[crateid][InVehicle] = INVALID_VEHICLE_ID;
    }
    if(CrateInfo[crateid][crActive])
    {
        CrateInfo[crateid][InVehicle] = INVALID_VEHICLE_ID;
        CrateInfo[crateid][crObject] = CreateDynamicObject(964,CrateInfo[crateid][crX],CrateInfo[crateid][crY],CrateInfo[crateid][crZ],0.00000000,0.00000000,0.00000000);
        format(string, sizeof(string), "Serial Number: #%d\n High Grade Materials: %d/50", i, CrateInfo[i][GunQuantity]);
        CrateInfo[crateid][crLabel] = CreateDynamic3DTextLabel(string, COLOR_ORANGE, CrateInfo[crateid][crX],CrateInfo[crateid][crY],CrateInfo[crateid][crZ]+1, 20.0, _, _, 1, 0, 0, _, 20.0);
       
    }
}
Error mysql @@:
Reply


Messages In This Thread
Amx Backtrace! - by nguyenquynh - 03.09.2013, 17:41
Re: Amx Backtrace! - by Konstantinos - 03.09.2013, 17:45
Re: Amx Backtrace! - by nguyenquynh - 03.09.2013, 17:47
Re: Amx Backtrace! - by Konstantinos - 03.09.2013, 17:50
Re: Amx Backtrace! - by nguyenquynh - 03.09.2013, 17:54
Re: Amx Backtrace! - by Konstantinos - 03.09.2013, 18:00
Re: Amx Backtrace! - by nguyenquynh - 03.09.2013, 18:13
Re: Amx Backtrace! - by Konstantinos - 03.09.2013, 18:20
Re: Amx Backtrace! - by nguyenquynh - 03.09.2013, 18:55
Re: Amx Backtrace! - by Konstantinos - 03.09.2013, 19:04

Forum Jump:


Users browsing this thread: 2 Guest(s)