Raised This Month: $ Target: $400
 0% 

Error invalid array handle provided (0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A.L.e.N
Member
Join Date: Nov 2009
Old 10-13-2014 , 11:46   Error invalid array handle provided (0)
Reply With Quote #1

Hi, I have a problem with a few logs that I have a plugin

L 10/12/2014 - 20:589: Invalid array handle provided (0)
L 10/12/2014 - 20:589: [AMXX] Displaying debug trace (plugin "zombie_plague40.amxx")
L 10/12/2014 - 20:589: [AMXX] Run time error 10: native error (native "ArraySize")
L 10/12/2014 - 20:589: [AMXX] [0] zombie_plague40.sma::get_user_group (line 9912)
L 10/12/2014 - 20:589: [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
A.L.e.N is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-13-2014 , 11:47   Re: Error invalid array handle provided (0)
Reply With Quote #2

g_grupos is a valid array ? Paste here the ArrayCreate line.
__________________

Last edited by HamletEagle; 10-13-2014 at 11:47.
HamletEagle is offline
HENNESSY
Member
Join Date: Sep 2013
Location: Russian Federation, Bela
Old 10-13-2014 , 15:07   Re: Error invalid array handle provided (0)
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
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 ); 

Last edited by HENNESSY; 10-13-2014 at 15:09.
HENNESSY is offline
Reply



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 17:06.


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