Raised This Month: $ Target: $400
 0% 

Stack error problem [SOLVED]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-19-2012 , 09:52   Stack error problem [SOLVED]
Reply With Quote #1

I'm getting this error
Code:
 [AMXX] Run time error 3: stack error
and if i remove this line
Code:
engclient_cmd ( id, "drop", gs_WeaponsName[ i_Index ] );
it works fine

here's the code
PHP Code:
#include < amxmodx >
#include < engine >
#include < fakemeta >

#define PLUGIN "New Plug-In"
#define VERSION "0.1"
#define AUTHOR "Author"

new const gs_Weapons[ ] =
{
    
CSW_AK47,
    
CSW_M4A1,
    
CSW_MP5NAVY
};

new const 
gs_WeaponsName[ ][ ] =
{
    
"weapon_ak47",
    
"weapon_m4a1",
    
"weapon_mp5navy"
};

new 
gi_MaxPlayers;

public 
plugin_init ( )
{
    
register_plugin PLUGINVERSIONAUTHOR );
    
gi_MaxPlayers get_maxplayers ( );

    new 
s_Map32 ];
    
get_mapname s_Map31 );
    
    if ( 
containi s_Map"awp_bycastor" ) > -)
        
register_event "CurWeapon","HookCurWeapon""be""1=1" );
}

public 
HookCurWeapon id )
{
    if ( ! 
is_user_alive id ) )
        return 
0;
    
    static 
i_CurWeaponi_Boxi_Weapon;
    
i_CurWeapon read_data );
    
    for ( new 
i_Indexi_Index sizeof gs_Weaponsi_Index++ )
    {
        if ( 
i_CurWeapon == gs_Weaponsi_Index ] )
        {
            
engclient_cmd id"drop"gs_WeaponsNamei_Index ] );
            
            
i_Weapon find_ent_by_class ( -1gs_WeaponsNamei_Index ] );
            
i_Box pev i_Weaponpev_owner );
            
            if ( 
i_Weapon && i_Box gi_MaxPlayers )
                
dllfunc DLLFunc_Thinki_Box );
        }
    }
    
    return 
0;

__________________


Last edited by anakin_cstrike; 02-19-2012 at 11:34.
anakin_cstrike is offline
 



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:40.


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