Brutality
Дебютант
[17:35:07] [debug] Run time error 4: "Array index out of bounds"
[17:35:07] [debug] Attempted to read/write array element at negative index -400
[17:35:07] [debug] AMX backtrace:
[17:35:07] [debug] #0 00122c1c in public cmd_sellcar (playerid=4, params[]=@00348320 "") at D:\server\gamemodes\new.pwn:16703
[17:35:07] [debug] #1 native CallLocalFunction () from samp03svr
[17:35:07] [debug] #2 000009d8 in public OnPlayerCommandText (playerid=4, cmdtext[]=@003482fc "/sellcar") at D:\server\pawno\include\zcmd.inc:118
строка
[17:35:07] [debug] Attempted to read/write array element at negative index -400
[17:35:07] [debug] AMX backtrace:
[17:35:07] [debug] #0 00122c1c in public cmd_sellcar (playerid=4, params[]=@00348320 "") at D:\server\gamemodes\new.pwn:16703
[17:35:07] [debug] #1 native CallLocalFunction () from samp03svr
[17:35:07] [debug] #2 000009d8 in public OnPlayerCommandText (playerid=4, cmdtext[]=@003482fc "/sellcar") at D:\server\pawno\include\zcmd.inc:118
строка
PHP:
format(string, 200, "{"#cBLUE"}Выберите автомобиль продажи!\n{D9D9D9}Транспортное средство {"#cBLUE"}[%s]\n{D9D9D9}Транспортое средство {"#cBLUE"}[%s]",gTransport[PlayerInfo[playerid][pCar][0]-400][trName],gTransport[PlayerInfo[playerid][pCar][1]-400][trName]);
PHP:
CMD:sellcar(playerid, params[])
{
new string[200];
if(GetPlayerHouse(playerid) == 0 && GetPlayerArendHouse(playerid) == 0) return SendClientMessage(playerid, COLOR_GREY, "Вы не владеете домом!");
SetPVarInt(playerid,"CarSaloon",4);
format(string, 200, "{"#cBLUE"}Выберите автомобиль продажи!\n{D9D9D9}Транспортное средство {"#cBLUE"}[%s]\n{D9D9D9}Транспортое средство {"#cBLUE"}[%s]",gTransport[PlayerInfo[playerid][pCar][0]-400][trName],gTransport[PlayerInfo[playerid][pCar][1]-400][trName]);
ShowPlayerDialog(playerid, D_CAR+2, DIALOG_STYLE_TABLIST_HEADERS,"{0089FF}Продажа автомобиля",string,"Принять","Отмена");
return true;
}
