Raised This Month: $ Target: $400
 0% 

Array index is out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dkmuniz
Senior Member
Join Date: Jun 2013
Old 01-23-2015 , 18:49   Array index is out of bounds
Reply With Quote #1

Hi my plugin give this log error :
Code:
L 01/23/2015 - 21:21:18: [SM] Plugin encountered error 15: Array index is out of bounds
L 01/23/2015 - 21:21:18: [SM] Displaying call stack trace for plugin "zbrincar_admin.smx":
L 01/23/2015 - 21:21:18: [SM]   [0]  Line 1292, zbrincar_admin.sp::OnTakeDamage()
My take damage:

PHP Code:
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
    if(
bBox == true)
    {
        if(
IsValidClient(attacker) && IsValidClient(victimtrue))
        {
            if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 3)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
            else if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 3)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
            else if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 2)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
        }
    }
    
    else if(
bBoxDesarmado == true)
    {
        if(
IsValidClient(attacker) && IsValidClient(victimtrue))
        {
            if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 3)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
            else if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 3)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
            else if(
attacker != victim && GetClientTeam(attacker) == && GetClientTeam(victim) == 2)
            {
                
damage 0.0;
                
                return 
Plugin_Changed;
            }
        }
    }
    
    else if(
bTubarao == true)
    {
        new 
MoveType:movetype GetEntityMoveType(victim); 
        if (
movetype == MOVETYPE_NOCLIP)
        {
            
hurts[victim]++;
            if(
hurts[victim] >= HURTSDEAD)
            
ForcePlayerSuicide(victim);
            
//SDKHooks_TakeDamage(victim, inflictor, attacker, damage, damagetype, weapon, damageForce, damagePosition);
        
}
    }
    
    else if(
vampiro[attacker])
    {
        new 
receber RoundToFloor(damage 0.5);
        
receber += GetClientHealth(attacker);
        
SetEntityHealth(attackerreceber);
    }
    
    return 
Plugin_Changed;

Help please ?
Dkmuniz is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode