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(id, key)
{
// 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+7 < 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 weplvl, wepreset
weplvl = ArrayGetCell( g_weplvl[0], WPN_SELECTION )
wepreset = ArrayGetCell( g_wepreset[0], WPN_SELECTION )
// Buy primary weapon
if( g_reset[id] > wepreset || (g_level[id] >= weplvl && g_reset[id] == wepreset) )
buy_primary_weapon(id, WPN_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 (?