SA-MP Forums Archive
Client Crash when opening dialog, Code wrong? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Client Crash when opening dialog, Code wrong? (/showthread.php?tid=605925)



Client Crash when opening dialog, Code wrong? - Stefand - 26.04.2016

Hello,

My client crashes when I do this command:
pawn Код:
command(roadblock, playerid, params[])
{
    //if PD/FD/DOC CHECK
    new RoadBlockString[256];
    for(new i = 0; i < sizeof(RoadblockObjects); i++){
        format(RoadBlockString, sizeof(RoadBlockString), "%s%s", RoadBlockString, RoadblockObjects[i][1]);
    }
    ShowPlayerDialog(playerid, DIALOG_ROADBLOCKS, DIALOG_STYLE_LIST, "{FFFFFF}RoadBlocks", RoadBlockString, "Deploy", "Cancel");
    return 1;
}
The RoadblockObjects is this:
pawn Код:
new RoadblockObjects[][] =
{
    {2899, "Short Spikestrip"},{2892, "Long Spikestrip"},{1427, "Small Barrier"},{1424, "Medium Barrier"},
    {973, "Large Barrier"},{1238, "Traffic Cone"},{1237, "Water Cone"},{19425, "Speedbump"},
    {1422, "Small 2 blocks"},{1425, "Detour Sign"},{19834, "Police Tape"},{8674, "Big Fence"},
    {19972, "Road Closed Sign"},{3091, "Line Closed Sign"}
};
Did I fuck something up?


Re: Client Crash when opening dialog, Code wrong? - Stefand - 26.04.2016

Nevermind forgot \n in my code lol