View Single Post
Author Message
jugule
AlliedModders Donor
Join Date: Apr 2020
Old 06-06-2020 , 09:11   [SM] Exception reported: Entity 1 (1) is invalid
Reply With Quote #1

06/06/2020 - 16:06:48: [SM] Exception reported: Entity 1 (1) is invalid
06/06/2020 - 16:06:48: [SM] Blaming: pluginn.smx
06/06/2020 - 16:06:48: [SM] Call stack trace:
06/06/2020 - 16:06:48: [SM][0] GetEntPropArraySize
06/06/2020 - 16:06:48: [SM][1] Line 3122, pluginn.sp::RemoveAllWeapons
06/06/2020 - 16:06:48: [SM][2] Line 6302, pluginn.sp::functiondd

6302: RemoveAllWeapons(x);

code
PHP Code:
void RemoveAllWeapons(int client)
{   
    
int length GetEntPropArraySize(clientProp_Send"m_hMyWeapons");
    for (
int i 0lengthi++) 
    {
        
int weapon GetEntPropEnt(clientProp_Send"m_hMyWeapons"i); 
        if (
weapon != -1)
        {
            
RemovePlayerItem(clientweapon);
            
AcceptEntityInput(weapon"KillHierarchy");
        }
    }
    
    
SetEntPropEnt(clientProp_Send"m_hActiveWeapon", -1);

what is problem?
jugule is offline