Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info
Статус
В этой теме нельзя размещать новые ответы.

Up date

Новичок
Помогите проблема с домами, из за этого сервер работает не корректно.

PHP:
[debug] Run time error 4: "Array index out of bounds"
[debug]  Accessing element at index 1266 past array upper bound 1265
[debug] AMX backtrace:
[debug] #0 000c17cc in public LoadProperty () from SharpRP.amx
Строчки :

PHP:
publics: LoadProperty()
{
	static rows, fields;
	cache_get_data(rows, fields);
	new temp[64],i=0,stringer[666];
	if(rows)
	{
		for(new he = 0;he < rows; he++)
		{
			cache_get_row(he, 0, temp), HouseInfo[he][hID] = strval(temp);
			cache_get_row(he, 1, temp), HouseInfo[he][hEntrancex] = floatstr(temp);
			cache_get_row(he, 2, temp), HouseInfo[he][hEntrancey] = floatstr(temp);
			cache_get_row(he, 3, temp), HouseInfo[he][hEntrancez] = floatstr(temp);
			cache_get_row(he, 4, temp), HouseInfo[he][hExitx] = floatstr(temp);
			cache_get_row(he, 5, temp), HouseInfo[he][hExity] = floatstr(temp);
			cache_get_row(he, 6, temp), HouseInfo[he][hExitz] = floatstr(temp);
			cache_get_row(he, 7, temp), strmid(HouseInfo[he][hOwner], temp, 0, strlen(temp), 255);
			cache_get_row(he, 8, temp), HouseInfo[he][hValue] = strval(temp);
			cache_get_row(he, 9, temp), HouseInfo[he][hHel] = strval(temp);
			cache_get_row(he, 10, temp), HouseInfo[he][hInt] = strval(temp);
			cache_get_row(he, 11, temp), HouseInfo[he][hLock] = strval(temp);
			cache_get_row(he, 12, temp), HouseInfo[he][hOwned] = strval(temp);
			cache_get_row(he, 13, temp), HouseInfo[he][hTakings] = strval(temp);
			cache_get_row(he, 14, temp), HouseInfo[he][hVec] = strval(temp);
			cache_get_row(he, 15, temp), HouseInfo[he][hVcol1] = strval(temp);
			cache_get_row(he, 16, temp), HouseInfo[he][hVcol2] = strval(temp);
			cache_get_row(he, 17, temp), HouseInfo[he][hKlass] = strval(temp);
			cache_get_row(he, 18, temp), HouseInfo[he][hVehSost] = strval(temp);
			cache_get_row(he, 19, temp), HouseInfo[he][hCarx] = floatstr(temp);
			cache_get_row(he, 20, temp), HouseInfo[he][hCary] = floatstr(temp);
			cache_get_row(he, 21, temp), HouseInfo[he][hCarz] = floatstr(temp);
			cache_get_row(he, 22, temp), HouseInfo[he][hCarc] = floatstr(temp);
			cache_get_row(he, 23, temp), HouseInfo[he][hMats] = strval(temp);
			cache_get_row(he, 24, temp), HouseInfo[he][hStyle] = strval(temp);
			cache_get_row(he, 25, temp), HouseInfo[he][hSost] = strval(temp);
			cache_get_row(he, 26, temp), HouseInfo[he][hGaraz] = strval(temp);
			i++;
			new h = he;
			if(HouseInfo[he][hOwned] == 0)
			{
			    HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 50.0);
			    format(stringer,sizeof(stringer),"{C9BBBB}Дом № {FFFFFF}%d{C9BBBB} продается\n\nЦена:{FFFFFF}$%d{C9BBBB}\n Чтоб купить нажмите {0BE654}'Y'",h,HouseInfo[h][hValue]);
			}
			if(HouseInfo[he][hOwned] == 1)
			{
   				format(stringer,sizeof(stringer),"{C9BBBB}Дом № {FFFFFF}%d\n\n{C9BBBB} Владелец:{ffffff} %s",h,HouseInfo[h][hOwner]);
				HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 50.0);
			}
			HouseInfo[he][hText] = CreateDynamic3DTextLabel(stringer, COLOR_GREY, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 5,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,-1,-1,-1, 10);
			HouseInfo[he][hPickup] = CreateDynamicCP(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 1, -1, -1, -1,10);
		}
		printf("[V] %d house loaded",i);
	}
	else printf("[X] house not loaded");
	return true;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу