21.02.2019, 09:06
I'm getting a error on dynamic doors in my server_logs
OnLoadDynamicDoors
Код:
[debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at index 2000 in array of size 2000 [debug] AMX backtrace: [debug] #0 000bfa70 in public OnLoadDynamicDoors () from gamemode.amx
PHP код:
forward OnLoadDynamicDoors();
public OnLoadDynamicDoors()
{
new i, rows, fields;
cache_get_data(rows, fields, MainPipeline);
while(i < rows)
{
DDoorsInfo[i][ddSQLId] = cache_get_field_content_int(i, "id", MainPipeline);
cache_get_field_content(i, "Description", DDoorsInfo[i][ddDescription], MainPipeline, 128);
DDoorsInfo[i][ddOwner] = cache_get_field_content_int(i, "Owner", MainPipeline);
cache_get_field_content(i, "OwnerName", DDoorsInfo[i][ddOwnerName], MainPipeline, 42);
DDoorsInfo[i][ddCustomExterior] = cache_get_field_content_int(i, "CustomExterior", MainPipeline);
DDoorsInfo[i][ddCustomInterior] = cache_get_field_content_int(i, "CustomInterior", MainPipeline);
DDoorsInfo[i][ddExteriorVW] = cache_get_field_content_int(i, "ExteriorVW", MainPipeline);
DDoorsInfo[i][ddExteriorInt] = cache_get_field_content_int(i, "ExteriorInt", MainPipeline);
DDoorsInfo[i][ddInteriorVW] = cache_get_field_content_int(i, "InteriorVW", MainPipeline);
DDoorsInfo[i][ddInteriorInt] = cache_get_field_content_int(i, "InteriorInt", MainPipeline);
DDoorsInfo[i][ddExteriorX] = cache_get_field_content_float(i, "ExteriorX", MainPipeline);
DDoorsInfo[i][ddExteriorY] = cache_get_field_content_float(i, "ExteriorY", MainPipeline);
DDoorsInfo[i][ddExteriorZ] = cache_get_field_content_float(i, "ExteriorZ", MainPipeline);
DDoorsInfo[i][ddExteriorA] = cache_get_field_content_float(i, "ExteriorA", MainPipeline);
DDoorsInfo[i][ddInteriorX] = cache_get_field_content_float(i, "InteriorX", MainPipeline);
DDoorsInfo[i][ddInteriorY] = cache_get_field_content_float(i, "InteriorY", MainPipeline);
DDoorsInfo[i][ddInteriorZ] = cache_get_field_content_float(i, "InteriorZ", MainPipeline);
DDoorsInfo[i][ddInteriorA] = cache_get_field_content_float(i, "InteriorA", MainPipeline);
DDoorsInfo[i][ddType] = cache_get_field_content_int(i, "Type",MainPipeline);
DDoorsInfo[i][ddRank] = cache_get_field_content_int(i, "Rank", MainPipeline);
DDoorsInfo[i][ddVIP] = cache_get_field_content_int(i, "VIP", MainPipeline);
DDoorsInfo[i][ddFamed] = cache_get_field_content_int(i, "Famed", MainPipeline);
DDoorsInfo[i][ddDPC] = cache_get_field_content_int(i, "DPC", MainPipeline);
DDoorsInfo[i][ddAllegiance] = cache_get_field_content_int(i, "Allegiance", MainPipeline);
DDoorsInfo[i][ddGroupType] = cache_get_field_content_int(i, "GroupType", MainPipeline);
DDoorsInfo[i][ddFaction] = cache_get_field_content_int(i, "Faction", MainPipeline);
DDoorsInfo[i][ddAdmin] = cache_get_field_content_int(i, "Admin", MainPipeline);
DDoorsInfo[i][ddWanted] = cache_get_field_content_int(i, "Wanted", MainPipeline);
DDoorsInfo[i][ddVehicleAble] = cache_get_field_content_int(i, "VehicleAble", MainPipeline);
DDoorsInfo[i][ddColor] = cache_get_field_content_int(i, "Color", MainPipeline);
DDoorsInfo[i][ddPickupModel] = cache_get_field_content_int(i, "PickupModel", MainPipeline);
cache_get_field_content(i, "Pass", DDoorsInfo[i][ddPass], MainPipeline, 24);
DDoorsInfo[i][ddLocked] = cache_get_field_content_int(i, "Locked", MainPipeline);
DDoorsInfo[i][ddLastLogin] = cache_get_field_content_int(i, "LastLogin", MainPipeline);
DDoorsInfo[i][ddExpire] = cache_get_field_content_int(i, "Expire", MainPipeline);
DDoorsInfo[i][ddInactive] = cache_get_field_content_int(i, "Inactive", MainPipeline);
DDoorsInfo[i][ddIgnore] = cache_get_field_content_int(i, "Ignore", MainPipeline);
DDoorsInfo[i][ddCounter] = cache_get_field_content_int(i, "Counter", MainPipeline);
if(DDoorsInfo[i][ddExteriorX] != 0.0) CreateDynamicDoor(i);
i++;
}
if(i > 0) printf("[LoadDynamicDoors] %d doors rehashed/loaded.", i);
else printf("[LoadDynamicDoors] Failed to load any doors.");
return 1;
}