Raised This Month: $ Target: $400
 0% 

give_item debug error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-18-2012 , 03:17   give_item debug error
Reply With Quote #1

Quote:
L 04/18/2012 - 08:21:23: [FUN] Item "weapon_gali" failed to create
L 04/18/2012 - 08:21:23: [AMXX] Displaying debug trace (plugin "kreedz.amxx")
L 04/18/2012 - 08:21:23: [AMXX] Run time error 10: native error (native "give_item")
L 04/18/2012 - 08:21:23: [AMXX] [0] kreedz.sma::get_weapons (line 899)
L 04/18/2012 - 08:21:23: [AMXX] [1] kreedz.sma::weapons_handler (line 873)
PHP Code:
new const other_weapons[11] = 
{
    
CSW_P228CSW_SCOUTCSW_SG550CSW_GALICSW_FAMAS,  CSW_AWP,
    
CSW_M249CSW_M4A1CSW_G3SG1CSW_AK47CSW_P90
}

new const 
other_weapons_name[11][] = 
{
    
"weapon_p228""weapon_scout""weapon_sg550""weapon_gali""weapon_famas""weapon_awp"
    
"weapon_m249""weapon_m4a1""weapon_g3sg1""weapon_ak47""weapon_p90"

PHP Code:
public get_weapons(id) {
    
    if (!
timer_started[id])
    {
        if(
get_pcvar_num(kz_other_weapons) == 1)
        {    
            if(
is_user_alive(id))
            {
                for(new 
011i++)
                    if( !
user_has_weapon(idother_weapons[i]) )
                    {
                        new 
item;
                        
item give_item(idother_weapons_name[i] );
                        
cs_set_weapon_ammo(item0);
                        if((
get_user_flags(id) & VIP ))
                        {
                        
cs_set_weapon_ammo(item90);
                        }
                    }
                    
                if( !
user_has_weapon(idCSW_USP) )
                    
cmdUsp(id)
            }
            else
                switch (
get_pcvar_num(kz_chatorhud))
                {
                    case 
1ColorChat(idGREEN"[KZ]^x01 You must be alive to use this function.")
                    case 
2kz_hud_message(id"You must be alive to use this function")
                }
        }
        else
            switch (
get_pcvar_num(kz_chatorhud))
            {
                case 
1ColorChat(idGREEN"[KZ]^x01 Different weapons are disabled.")
                case 
2kz_hud_message(id"Different weapons are disabled")
            }
    }
    else
        switch (
get_pcvar_num(kz_chatorhud))
        {
            case 
1ColorChat(idGREEN"[KZ]^x01 You can not get different weapons during a run, type /reset.")
            case 
2kz_hud_message(id"You can not get different weapons during a run, type /reset")
        }
    return 
PLUGIN_HANDLED

what the

Last edited by bazhenov93; 04-18-2012 at 03:22.
bazhenov93 is offline
Ortega
Junior Member
Join Date: Nov 2009
Old 04-18-2012 , 08:56   Re: give_item debug error
Reply With Quote #2

Try
PHP Code:
"weapon_galil" 
cuz gali is an old name as far I know
__________________
Ave duru genus.
Ortega is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-20-2012 , 23:37   Re: give_item debug error
Reply With Quote #3

L 04/21/2012 - 046:02: [CSTRIKE] Non-player entity -1 out of range
L 04/21/2012 - 046:02: [AMXX] Displaying debug trace (plugin "prokreedz_sql.amxx")
L 04/21/2012 - 046:02: [AMXX] Run time error 10: native error (native "cs_set_weapon_ammo")
L 04/21/2012 - 046:02: [AMXX] [0] prokreedz_sql.sma::wrun_handler (line 951)
bazhenov93 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-21-2012 , 00:48   Re: give_item debug error
Reply With Quote #4

Well, it looks like the weapon is not being given. That should have been obvious in game. Check it "item" is a valid entity before using it in any function.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 07:47.


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