15.05.2014, 07:00
Hello, I added this
And those messages doesnt appear. I tried to add the crashdetect plugin and i figure out the problem. Is caming from that line (im very sure)
How do i fix it Thanks
Full Debug Error
Just a note: Before i add that everything is fine no debug errors after i add it appears.
Respectfully yours,
Код:
new cdveh = GetPlayerVehicleID(MAX_PLAYERS); if(GetCarDealershipVehicleId(cdveh) != -1 && GetCarDealershipVehicleId(cdveh) == GetPVarInt(playerid, "editingcdveh")) return 1; if(GetCarDealershipVehicleId(cdveh) != -1) { new string[128]; //new string[57 + 20 + 4]; format(string, sizeof(string),"Would you like to buy this %s? This vehicle costs $%d.", GetVehicleName(cdveh), CarDealershipInfo[GetCarDealershipId(cdveh)][cdVehicleCost][GetCarDealershipVehicleId(cdveh)]); //ShowPlayerDialogEx(playerid,DIALOG_CDBUY,DIALOG_STYLE_MSGBOX,"Warning:",string,"Buy","Cancel"); SendClientMessage(playerid, COLOR_REALRED, string); SendClientMessage(playerid, COLOR_YELLOW, "Type /buyvehicle to buy the car"); TogglePlayerControllable(playerid, false); return 1; }
How do i fix it Thanks
Full Debug Error
Код:
[15/05/2014 15:14:07] [debug] Run time error 4: "Array index out of bounds" [15/05/2014 15:14:07] [debug] Accessing element at negative index -400 [15/05/2014 15:14:07] [debug] AMX backtrace: [15/05/2014 15:14:07] [debug] #0 002641b4 in public OnPlayerStateChange (0x00000000, 0x00000002, 0x00000001) from PHRP_1.5.amx
Respectfully yours,