15.06.2014, 19:04
According to what the crashdetect prints there's a CallLocalFunction for the stock DMVMainDialog, The modelid in the format makes problems but i have no idea what to do anymore, i looked in some threads and the ' -400' might solve it but no solution yet -_-
When typing /buyout command:
Crashdetect prints:
The stock:
When typing /buyout command:
Crashdetect prints:
Код:
[15/06/2014 22:21:33] [zcmd] [Costia Costia] [ 0 ]: /buyout [15/06/2014 22:21:33] [debug] Run time error 4: "Array index out of bounds" [15/06/2014 22:21:33] [debug] Accessing element at negative index -400 [15/06/2014 22:21:33] [debug] AMX backtrace: [15/06/2014 22:21:33] [debug] #0 0051dda4 in ?? () from CGRP.amx [15/06/2014 22:21:33] [debug] #1 003ba458 in public cmd_buyout () from CGRP.amx [15/06/2014 22:21:33] [debug] #2 native CallLocalFunction () [00472ad0] from samp-server.exe [15/06/2014 22:21:33] [debug] #3 00013fd0 in public OnPlayerCommandText () from CGRP.amx [15/06/2014 22:21:43] [debug] Run time error 4: "Array index out of bounds" [15/06/2014 22:21:43] [debug] Accessing element at negative index -400 [15/06/2014 22:21:43] [debug] AMX backtrace: [15/06/2014 22:21:43] [debug] #0 0051dda4 in ?? () from CGRP.amx [15/06/2014 22:21:43] [debug] #1 0051f944 in public OnDialogResponse () from CGRP.amx
Код:
stock DMVMainDialog(playerid) { new string[128]; for(new i; i < MAX_PLAYERVEHICLES; i++) { slotselection[playerid] = -1; format(string, sizeof(string), "%s\n%s Plate: %s", string, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400], PlayerVehicleInfo[playerid][i][pvNumberPlate]); ShowPlayerDialog(playerid, DMV_BUYOUT, DIALOG_STYLE_LIST, "Buyout Impounded vehicles", string, "Choose", "Quit"); } return 1; }