Crashdetec, error 4: "Array index out of bounds" HELP
#1

PHP код:
[14:27:04] [debugRun time error 4"Array index out of bounds"
[14:27:04] [debug]  Attempted to read/write array element at index 91 in array of size 91
[14:27:04] [debugAMX backtrace:
[
14:27:04] [debug#0 001694e4 in public dmgTdUpdate () from Mundito.amx 
PHP код:
public dmgTdUpdate()
{
        for(new 
playerid 0playerid MAX_SERVER_PLAYERSplayerid++)
        {
                if(!
IsPlayerConnected(playerid)) continue;
                if(
txdAlpha[0][playerid] > 0)
                {
                        
TextDrawColor(txd[0][playerid], setAlpha(COLOR_LEFTtxdAlpha[0][playerid]));
                        
TextDrawBackgroundColor(txd[0][playerid], setAlpha(0x000000FFtxdAlpha[0][playerid] / 0x6));
                        
TextDrawShowForPlayer(playeridtxd[0][playerid]);
                        
txdAlpha[0][playerid] -= 0x6;
                }
                else if(
txdAlpha[0][playerid] < 0)
                {
                        
TextDrawHideForPlayer(playeridtxd[0][playerid]);
                        
txdAlpha[0][playerid] = 0;
                        for(new 
0MAX_SERVER_PLAYERSa++)
                                
currentHpLoss[0][playerid][a] = 0.0;
                }
                if(
txdAlpha[1][playerid] > 0)
                {
                        
TextDrawColor(txd[1][playerid], setAlpha(COLOR_RIGHTtxdAlpha[1][playerid]));
                        
TextDrawBackgroundColor(txd[1][playerid], setAlpha(0x000000FFtxdAlpha[1][playerid] / 0x6));
                        
TextDrawShowForPlayer(playeridtxd[1][playerid]);
                        
txdAlpha[1][playerid] -= 0x6;
                }
                else if(
txdAlpha[1][playerid] < 0)
                {
                        
TextDrawHideForPlayer(playeridtxd[1][playerid]);
                        
txdAlpha[1][playerid] = 0;
                        for(new 
0playerid MAX_SERVER_PLAYERSa++)
                                
currentHpLoss[1][playerid][a] = 0.0;
                }
        }
}
setAlpha(colora)
{
        return (((
color >> 24) & 0xFF) << 24 | ((color >> 16) & 0xFF) << 16 | ((color >> 8) & 0xFF) << floatround((float(color 0xFF) / 255) * a));
}
createTextDraws()
{
        for(new 
playerid 0playerid MAX_SERVER_PLAYERSplayerid++)
        {
                
txd[0][playerid] = TextDrawCreate(200.0370.0" ");
                
TextDrawLetterSize(txd[0][playerid], 0.241.1);
                
TextDrawColor(txd[0][playerid], COLOR_LEFT);
                
TextDrawFont(txd[0][playerid], 1);
                
TextDrawSetShadow(txd[0][playerid], 0);
                
TextDrawAlignment(txd[0][playerid], 2);
                
TextDrawSetOutline(txd[0][playerid], 1);
                
TextDrawBackgroundColor(txd[0][playerid], 0x0000000F);
                
txd[1][playerid] = TextDrawCreate(440.0370.0" ");
                
TextDrawLetterSize(txd[1][playerid], 0.241.1);
                
TextDrawColor(txd[1][playerid], COLOR_RIGHT);
                
TextDrawFont(txd[1][playerid], 1);
                
TextDrawSetShadow(txd[1][playerid], 0);
                
TextDrawAlignment(txd[1][playerid], 2);
                
TextDrawSetOutline(txd[1][playerid], 1);
                
TextDrawBackgroundColor(txd[1][playerid], 0x0000000F);
        }

help
Reply


Messages In This Thread
Crashdetec, error 4: "Array index out of bounds" HELP - by tomasfernandez - 18.03.2017, 20:36

Forum Jump:


Users browsing this thread: 1 Guest(s)