Raised This Month: $ Target: $400
 0% 

Invalid cellvector handle provided


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 12-31-2012 , 16:03   Invalid cellvector handle provided
Reply With Quote #1

well a friend send me it because he had problems with his buy menu
I don't understand why happend it

ERROR:
Quote:
L 12/31/2012 - 17:05:26: Invalid cellvector handle provided (142:6:6)
L 12/31/2012 - 17:05:26: [AMXX] Displaying debug trace (plugin "zombie.amxx")
L 12/31/2012 - 17:05:26: [AMXX] Run time error 10: native error (native "ArrayGetCell")
L 12/31/2012 - 17:05:26: [AMXX] [0] zombie.sma::menu_buy1 (line 4590)
Menu_buy1:
PHP Code:
public menu_buy1(idkey)
{
    
// Player dead?
    
if (!g_isalive[id])
        return 
PLUGIN_HANDLED;
    
    
// Zombies or survivors get no guns
    
if (g_zombie[id] || g_survivor[id])
        return 
PLUGIN_HANDLED;
    
    
// Special keys / weapon list exceeded
    
if (key >= MENU_KEY_AUTOSELECT || WPN_SELECTION >= WPN_MAXIDS)
    {
        switch (
key)
        {
            case 
MENU_KEY_NEXT// next/back
            
{
                if (
WPN_STARTID+WPN_MAXIDS)
                    
WPN_STARTID += 7
                
else
                    
WPN_STARTID 0
            
}
            case 
MENU_KEY_EXIT// exit
            
{
                return 
PLUGIN_HANDLED;
            }
        }
        
        
// Show buy menu again
        
show_menu_buy1(id)
        return 
PLUGIN_HANDLED;
    }
    
    
// Store selected weapon id
    
WPN_AUTO_PRI WPN_SELECTION
    
    
new weplvlwepreset
    weplvl 
ArrayGetCellg_weplvl[0], WPN_SELECTION )
    
wepreset ArrayGetCellg_wepreset[0], WPN_SELECTION )
    
    
// Buy primary weapon
    
if( g_reset[id] > wepreset || (g_level[id] >= weplvl && g_reset[id] == wepreset) )
        
buy_primary_weapon(idWPN_AUTO_PRI)
    else if( 
g_reset[id] < wepreset || g_level[id] < weplvl)
    {
        
zp_colored_print(id"^x04[ZP]^x01 No cumples con los requisitos de esa arma")
        
show_menu_buy1(id)
        return 
PLUGIN_HANDLED
    
}
    
    
// Show pistols menu
    
show_menu_buy2(id)
    
    return 
PLUGIN_HANDLED;

sorry for my bad english, i'm on holidays (?
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-31-2012 , 16:10   Re: Invalid cellvector handle provided
Reply With Quote #2

"out of bound" issue. Your array has as size 6 (so item goes from index 0 to 5) and you're asking the item 6, which is > size of array. WPN_SELECTION is most likely wrong.
__________________
Arkshine 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 13:46.


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