VLeone
Нуль
- Регистрация
- 18 Авг 2019
- Сообщения
- 7
- Лучшие ответы
- 0
- Репутация
- 0
Доброго времени суток, уважаемые пользователи форума.
Хотел задать вопрос: почему у меня при нажатии каких-либо клавиш в моде в консоли сервера возникают следующие сообщения:
Вот фрагмент того самого паблика и тех самых строк:
В инклудe nex-ac просто идет ссылка на этот паблик, поэтому прикреплять не стал. Помогите, пожалуйста, разобраться с проблемой.
Хотел задать вопрос: почему у меня при нажатии каких-либо клавиш в моде в консоли сервера возникают следующие сообщения:
PHP:
[23:06:17] [debug] AMX backtrace:
[23:06:17] [debug] #0 00c8d0c4 in public OnPlayerKeyStateChange (playerid=0, newkeys=1024, oldkeys=0) at C:\Users\rom-v\OneDrive\Рабочий стол\fffffff\gamemodes\virginia.pwn:26951
[23:06:25] [debug] Run time error 4: "Array index out of bounds"
[23:06:25] [debug] Accessing element at negative index -1
PHP:
if(PRESSED(KEY_WALK) && !IsPlayerInAnyVehicle(playerid))
{
new house = PlayerInfo[playerid][pHouseKey];
new veh_id = GetPlayerVehicleID(playerid);
if(GarageEntered[playerid] == -1)
{
for(new i = 0; i < MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.5, HouseInfo[house][hGarage_X], HouseInfo[house][hGarage_Y], HouseInfo[house][hGarage_Z])) // 26951 строка с ошибкой.
{
if(!GetString(HouseInfo[house][hOwner],Name(playerid))) return SendClientMessage(playerid, COLOR_RED, "[Ошибка] {FFFFFF}Это не ваш гараж!");
if(veh_id != 0)
{
J_SetVehiclePos(veh_id,GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_X],GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_Y],GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_Z]);
SetVehicleZAngle(veh_id,GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_A]);
LinkVehicleToInterior(veh_id, GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_INT]);
SetVehicleVirtualWorld(veh_id, house+50);
f_TogglePlayerControllable(playerid, false);
SetTimerEx("UnFreez",10000, 0, "d", playerid);
}
J_SetPlayerPosFreeze(playerid,GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_X],GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_Y],GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_Z]);
J_SetPlayerFacingAngle(playerid,GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_A]);
SetPlayerInterior(playerid, GaragesInteriors[HouseInfo[house][hIntGarage]][e_GARAGE_INTERIOR_INT]);
SetPlayerVirtualWorld(playerid, house+50);
if(veh_id != 0) PutPlayerInVehicle(playerid, veh_id, 0);
GarageEntered[playerid] = house;
return 1;
}