Run time error 4: Array index out of bounds
#1

Hi, i want to test a gamemode that i found and i get a problem that i get in mine but i fixed it easy, this is more difficult, i dont find the error

Quote:

[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 682 past array upper bound 681
[debug] AMX backtrace:
[debug] #0 0000352c in Bar:CreateProgressBar (Float=1.00000, Float:y=444.00000, Float:width=638.50000, Float:height=2.50000, color=-1802267649, Float:max=100.00000) at C:\Reality Roleplay\gm\asdasd\GameMode\pawno\include\progress .inc:71
[debug] #1 000aa490 in public cargartodo () at C:\Reality Roleplay\gm\gmniceca\GameMode\gamemodes\OC.pwn:872 2


Si its say the error is in progress.inc include and gamemode line 8722..


Gamemode line 8722:

PHP код:
    XP[i]            = CreateProgressBar(1.00444.00638.502.50, -1802267649100.0); 
progress.inc line 71:
PHP код:
stock Bar:CreateProgressBar(Float:xFloat:yFloat:width=55.5Float:height=3.2colorFloat:max=100.0)
{
    new
        
barid;
    for(
barid 0barid sizeof Bars; ++barid)
        if(!
Bars[barid][pb_created]) break;
    if(
Bars[barid][pb_created] || barid == sizeof Bars// HERE, maybe i have to update progress inc?
        
return INVALID_BAR_ID;
    new 
Text:in_t Bars[barid][pb_t1] = TextDrawCreate(xy"_");
    
TextDrawUseBox        (in_t1);
    
TextDrawTextSize    (in_twidth0.0);
    
TextDrawLetterSize    (in_t1.0height 10);
    
TextDrawBoxColor    (in_t0x00000000 | (color 0x000000FF));
    
in_t Bars[barid][pb_t2] = TextDrawCreate(1.22.15"_");
    
TextDrawUseBox        (in_t1);
    
TextDrawTextSize    (in_twidth 2.00.0);
    
TextDrawLetterSize    (in_t1.0height 10 0.35);
    
TextDrawBoxColor    (in_t, (color 0xFFFFFF00) | (0x66 & ((color 0x000000FF) / 2)));
    
in_t Bars[barid][pb_t3] = TextDrawCreate(1.22.15"_");
    
TextDrawTextSize    (in_tpb_percent(xwidthmax1.0), 0.0);
    
TextDrawLetterSize    (in_t1.0height 10 0.35);
    
TextDrawBoxColor    (in_tcolor); 
Bars[barid][pb_x] = x;
Bars[barid][pb_y] = y;
Bars[barid][pb_w] = width;
Bars[barid][pb_h] = height;
Bars[barid][pb_m] = max;
Bars[barid][pb_color] = color;
Bars[barid][pb_created] = true;
return Bar:barid;
}


thank you again..
Reply


Messages In This Thread
Run time error 4: Array index out of bounds - by R3SpaWn0 - 04.08.2018, 16:05
Re: Run time error 4: Array index out of bounds - by DBZdabIt3Bro7 - 04.08.2018, 16:10
Re: Run time error 4: Array index out of bounds - by R3SpaWn0 - 04.08.2018, 16:12
Re: Run time error 4: Array index out of bounds - by DBZdabIt3Bro7 - 04.08.2018, 16:20
Re: Run time error 4: Array index out of bounds - by R3SpaWn0 - 04.08.2018, 16:34

Forum Jump:


Users browsing this thread: 1 Guest(s)