AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Error invalid array handle provided (0) (https://forums.alliedmods.net/showthread.php?t=249860)

A.L.e.N 10-13-2014 11:46

Error invalid array handle provided (0)
 
Hi, I have a problem with a few logs that I have a plugin

L 10/12/2014 - 20:58:39: Invalid array handle provided (0)
L 10/12/2014 - 20:58:39: [AMXX] Displaying debug trace (plugin "zombie_plague40.amxx")
L 10/12/2014 - 20:58:39: [AMXX] Run time error 10: native error (native "ArraySize")
L 10/12/2014 - 20:58:39: [AMXX] [0] zombie_plague40.sma::get_user_group (line 9912)
L 10/12/2014 - 20:58:39: [AMXX] [1] zombie_plague40.sma::client_putinserver (line 2266)

Say, the code works perfectly, but it does not check well the groups, this is the line, and get_user_group

PHP Code:

get_user_group(id)
{
    new 
szAuthID[35]
    
get_user_authid(idszAuthIDcharsmax(szAuthID))
    new 
aData[AMIGOS_INFO]
    
    for(new 
0ArraySize(g_grupos); i++)
    {
        
ArrayGetArray(g_gruposiaData)
        
        if(
TrieKeyExists(aData[GRUPO_AMIGOS], szAuthID))
            return 
i;
    }
    
    return -
1;


PHP Code:

g_igroups[id] = get_user_group(id// Line 2266 

thanks

HamletEagle 10-13-2014 11:47

Re: Error invalid array handle provided (0)
 
g_grupos is a valid array ? Paste here the ArrayCreate line.

HENNESSY 10-13-2014 15:07

Re: Error invalid array handle provided (0)
 
Quote:

Originally Posted by HamletEagle (Post 2210588)
g_grupos is a valid array ? Paste here the ArrayCreate line.

he trying to make a gangs system, and he didn't create the array.

add in plugin_init( )

PHP Code:

g_grupos ArrayCreateAMIGOS_INFO ); 



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

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