Path Finding Server Crash
#1

Hi Friends
today iam here up with a problem in advanced path finding gps and it crashes my server i don't know where is wrong

here is my code iam using
pawn Код:
#include <a_samp>
#include <RouteConnector>
#include <streamer>

enum RouteInformation
{
    Destination,
    CreatedObjects[1024],
    bool:calculating,
    Lenght,
    GPS_Polygon,
    bool:IsInGPS_Polygon
};

new PlayerRoute[MAX_PLAYERS][RouteInformation];

#pragma dynamic 16777215

public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    if(PlayerRoute[playerid][calculating])
    {
        SendClientMessage(playerid,0xFFFF00FF,"Please wait before selecting your next destination!");
        return 1;
    }
    if(PlayerRoute[playerid][Destination] != -1)
    {
        DisableGPS(playerid);
    }
    new PlayerClosest = NearestPlayerNode(playerid);
    new TempDestination = NearestNodeFromPoint(fX,fY,fZ);
    if(PlayerClosest == -1)
    {
        SendClientMessage(playerid,0xFFFF00FF,"Your current location is unknown, GPS cannot be activated");
        return 1;
    }
    if(TempDestination == -1)
    {
        SendClientMessage(playerid,0xFFFF00FF,"Your selected destination is not known to the GPS, please try again");
        return 1;
    }
    if(CalculatePath(PlayerClosest, TempDestination, playerid, .CreatePolygon = true, .GrabNodePositions = true))
    {
        PlayerRoute[playerid][calculating] = true;
        SendClientMessage(playerid,0xFFFF00FF,"Connecting to sattelite.. please wait.");
    }
    else
    {
        SendClientMessage(playerid,0xFFFF00FF,"Unknown error occured, please try again.");
    }
    return 1;
}

public OnPlayerClosestNodeIDChange(playerid,old_NodeID,new_NodeID)
{
    if(new_NodeID != -1)
    {
        if(PlayerRoute[playerid][Destination] != -1)
        {
            if(PlayerRoute[playerid][Destination] == new_NodeID)
            {
                SendClientMessage(playerid,0xFFFF00FF,"You have reached your destination, have a nice day! [GPS OFF..]");
                DisableGPS(playerid);
            }
            else
            {
                if(!PlayerRoute[playerid][IsInGPS_Polygon])
                {
                    if(!PlayerRoute[playerid][calculating])
                    {
                       
                        if(CalculatePath(new_NodeID, PlayerRoute[playerid][Destination], playerid, .CreatePolygon = true, .GrabNodePositions = true))
                        {
                            DisableGPS(playerid);
                            PlayerRoute[playerid][calculating] = true;
                        }
                    }
                }
            }
        }
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    PlayerRoute[playerid][Destination] = -1;
    return 1;
}

public OnPlayerDisconnect(playerid,reason)
{
    if(PlayerRoute[playerid][Destination] != -1)
    {
        DisableGPS(playerid);
    }
    return 1;
}

stock DisableGPS(playerid)
{
    if(PlayerRoute[playerid][Destination] != -1)
    {
        for(new i = 0; i < PlayerRoute[playerid][Lenght]; ++i)
        {
            DestroyPlayerObject(playerid,PlayerRoute[playerid][CreatedObjects][i]);
        }
        PlayerRoute[playerid][Lenght] = 0;
        PlayerRoute[playerid][Destination] = -1;
        gps_RemovePlayer(playerid);
        DestroyDynamicArea(PlayerRoute[playerid][GPS_Polygon]);
        PlayerRoute[playerid][GPS_Polygon] = -1;
        PlayerRoute[playerid][IsInGPS_Polygon] = false;
    }
    return 1;
}

public GPS_WhenRouteIsCalculated(routeid,node_id_array[],amount_of_nodes,Float:distance,Float:Polygon[],Polygon_Size,Float:NodePosX[],Float:NodePosY[],Float:NodePosZ[])//Every processed Queue will be called here
{
    PlayerRoute[routeid][calculating] = false;
    if(amount_of_nodes > 1)
    {
        for(new i = 0; i < amount_of_nodes; ++i)
        {
            PlayerRoute[routeid][CreatedObjects][i] = CreateDynamicObject(1318,X,Y,Z+1.0,0.0,0.0,0.0, -1, -1, routeid, 50.0);
        }
        PlayerRoute[routeid][Lenght] = amount_of_nodes;
        PlayerRoute[routeid][Destination] = node_id_array[amount_of_nodes-1];
        PlayerRoute[routeid][GPS_Polygon] = CreateDynamicPolygon(Polygon,.maxpoints = Polygon_Size,.playerid = routeid);
        PlayerRoute[routeid][IsInGPS_Polygon] = IsPlayerInDynamicArea(routeid,PlayerRoute[routeid][GPS_Polygon]) == 1;
        gps_AddPlayer(routeid);
        SendClientMessage(routeid,0xFFFF00FF,"Recieved route information, happy drivin'!");
    }
    else
    {
        SendClientMessage(routeid,0xFFFF00FF,"Satellite not responsive, try another destination.");
    }
    return 1;
}

public OnPlayerEnterDynamicArea(playerid, areaid)
{
    if(areaid == PlayerRoute[playerid][GPS_Polygon])//check if the areas match
    {
        PlayerRoute[playerid][IsInGPS_Polygon] = true;
    }
    return 1;
}

public OnPlayerLeaveDynamicArea(playerid, areaid)
{
    if(areaid == PlayerRoute[playerid][GPS_Polygon] && PlayerRoute[playerid][IsInGPS_Polygon])
    {
        if(!PlayerRoute[playerid][calculating])
        {
            new PlayerClosest = NearestPlayerNode(playerid);
            if(PlayerClosest != -1)
            {
                if(CalculatePath(PlayerClosest, PlayerRoute[playerid][Destination], playerid, .CreatePolygon = true, .GrabNodePositions = true))
                {
                    DisableGPS(playerid);
                    PlayerRoute[playerid][calculating] = true;
                }
            }
        }
        PlayerRoute[playerid][IsInGPS_Polygon] = false;
    }
    return 1;
}
i don't know what is wrong so please help me
Thanks in advance,
Kingmac
Reply
#2

Use the crashdetect plugin, it will give more advanced information in the server log when it crashes. Please delete the server_log.txt before starting the server with crashdetect, it will be more easy for us to find the crash point then. Once done, post the server_log.txt here between [code] tags.

Also, did you load the routeconnector plugin? And, did it load correctly?
Reply
#3

yes it loaded correctly and here is the crash detect plugin server log

Код:
1 [debug] Server crashed due to an unknown error
1 [debug] Native backtrace:
1 [debug] #0 74fd2005 in ?? () from H:\WINDOWS\system32\KERNELBASE.dll
1 [debug] #1 687e9863 in ?? () from H:\WINDOWS\SYSTEM32\MSVCR110.dll
1 [debug] #2 687530ef in ?? () from H:\WINDOWS\SYSTEM32\MSVCP110.dll
1 [debug] #3 5b7074d7 in ?? () from H:\Samp_server\plugins\RouteConnectorPlugin.DLL
1 [debug] #4 00469046 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #5 00488afd in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #6 00495151 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #7 00495161 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #8 ffc30000 in ?? ()
1 [debug] #9 e8042474 in ?? ()
1 [debug] #10 ffffffbf in ?? ()
1 [debug] #11 c01bd8f7 in ?? ()
1 [debug] #12 4859d8f7 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #13 247c83c3 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #14 06740008 in ?? ()
1 [debug] #15 412d01c6 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #16 8b56d8f7 in ?? ()
1 [debug] #17 f7d233f1 in ?? ()
1 [debug] #18 83082474 in ?? ()
1 [debug] #19 057609fa in ?? ()
1 [debug] #20 eb57c280 in ?? ()
1 [debug] #21 30c28003 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #22 85411188 in ?? ()
1 [debug] #23 c6e677c0 in ?? ()
1 [debug] #24 8a490001 in ?? ()
1 [debug] #25 88018a16 in ?? ()
1 [debug] #26 06884911 in ?? ()
1 [debug] #27 72f13b46 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #28 55c35ef2 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #29 7d83ec8b in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #30 458b0a10 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #31 850a7508 in ?? ()
1 [debug] #32 6a067dc0 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #33 eb0a6a01 in ?? ()
1 [debug] #34 ff006a05 in ?? ()
1 [debug] #35 4d8b1075 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #36 ff9fe80c in ?? ()
1 [debug] #37 458bffff in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #38 5d59590c in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #39 244c8bc3 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #40 24448b08 in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #41 ff006a04 in ?? ()
1 [debug] #42 e8102474 in ?? ()
1 [debug] #43 ffffff85 in ?? ()
1 [debug] #44 1024448b in ?? () from H:\Samp_server\samp-server.exe
1 [debug] #45 e8c35959 in ?? ()
Reply
#4

Does the server run correctly if you use a standard gamemode, like Grand Larcency?
Reply
#5

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
Does the server run correctly if you use a standard gamemode, like Grand Larcency?
Yes it is
Reply
#6

Anyone pls?
Reply
#7

No one is good enough at scripting to find problem in this?
Reply
#8

Extract from rar
in you pawno folder(where is pawno.exe located) this file pawn.cfg and compile gm then show crash detect plugin server log
Reply
#9

it's same as i showed.
Reply
#10

Try to add this parameters in you Build->Run Option
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)