Attempted to read/write array element at index 2000 in array of size 2000
#1

I'm getting a error on dynamic doors in my server_logs

Код:
[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
OnLoadDynamicDoors

PHP код:
forward OnLoadDynamicDoors();
public 
OnLoadDynamicDoors()
{
    new 
irowsfields;
    
cache_get_data(rowsfieldsMainPipeline);
    while(
rows)
    {
        
DDoorsInfo[i][ddSQLId] = cache_get_field_content_int(i"id"MainPipeline);
        
cache_get_field_content(i"Description"DDoorsInfo[i][ddDescription], MainPipeline128);
        
DDoorsInfo[i][ddOwner] = cache_get_field_content_int(i"Owner"MainPipeline);
        
cache_get_field_content(i"OwnerName"DDoorsInfo[i][ddOwnerName], MainPipeline42);
        
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], MainPipeline24);
        
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.0CreateDynamicDoor(i);
        
i++;
    }
    if(
0printf("[LoadDynamicDoors] %d doors rehashed/loaded."i);
    else 
printf("[LoadDynamicDoors] Failed to load any doors.");
    return 
1;

Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
So you probably loaded too many.
How do i fix this issue?
Reply
#3

Increase your array's max size or reduce your doors
Reply
#4

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
Increase your array's max size or reduce your doors
And where can I do that ? Nothing much shows up when I search on array
Reply
#5

If you have a #define MAX_DOORS 5000 Increase it to something higher.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)