[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 ![]() [debug] #1 000aa490 in public cargartodo () at C:\Reality Roleplay\gm\gmniceca\GameMode\gamemodes\OC.pwn:872 2 |
XP[i] = CreateProgressBar(1.00, 444.00, 638.50, 2.50, -1802267649, 100.0);
stock Bar:CreateProgressBar(Float:x, Float:y, Float:width=55.5, Float:height=3.2, color, Float:max=100.0)
{
new
barid;
for(barid = 0; barid < 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(x, y, "_");
TextDrawUseBox (in_t, 1);
TextDrawTextSize (in_t, x + width, 0.0);
TextDrawLetterSize (in_t, 1.0, height / 10);
TextDrawBoxColor (in_t, 0x00000000 | (color & 0x000000FF));
in_t = Bars[barid][pb_t2] = TextDrawCreate(x + 1.2, y + 2.15, "_");
TextDrawUseBox (in_t, 1);
TextDrawTextSize (in_t, x + width - 2.0, 0.0);
TextDrawLetterSize (in_t, 1.0, height / 10 - 0.35);
TextDrawBoxColor (in_t, (color & 0xFFFFFF00) | (0x66 & ((color & 0x000000FF) / 2)));
in_t = Bars[barid][pb_t3] = TextDrawCreate(x + 1.2, y + 2.15, "_");
TextDrawTextSize (in_t, pb_percent(x, width, max, 1.0), 0.0);
TextDrawLetterSize (in_t, 1.0, height / 10 - 0.35);
TextDrawBoxColor (in_t, color);
for(new i=0;i<MAX_PLAYERS;i++)
{
NotiConnect[i][0] = TextDrawCreate(13.000000, 265.911041, "box");
TextDrawLetterSize(NotiConnect[i][0], 0.000000, 4.799999);
TextDrawTextSize(NotiConnect[i][0], 182.000000, 0.000000);
TextDrawAlignment(NotiConnect[i][0], 1);
TextDrawColor(NotiConnect[i][0], -1);
TextDrawUseBox(NotiConnect[i][0], 1);
TextDrawBoxColor(NotiConnect[i][0], 255);
TextDrawSetShadow(NotiConnect[i][0], 0);
TextDrawSetOutline(NotiConnect[i][0], 0);
TextDrawBackgroundColor(NotiConnect[i][0], 255);
TextDrawFont(NotiConnect[i][0], 0);
TextDrawSetProportional(NotiConnect[i][0], 1);
TextDrawSetShadow(NotiConnect[i][0], 0);
new Bar:XP[MAX_PLAYERS], Bar:speedbar2[MAX_PLAYERS], Bar:speedbar[MAX_PLAYERS], Bar:Barrased[MAX_PLAYERS], Bar:Barrahambre[MAX_PLAYERS];