Raised This Month: $ Target: $400
 0% 

[HAMSANDWICH] Entity out of range


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 11-19-2011 , 16:26   [HAMSANDWICH] Entity out of range
Reply With Quote #1

Hi.

I have a plugin that give me an error sometimes... I dont know when the error comes but i think that is the problem that shut down my servers.

Code:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>

public plugin_init()
{
    
register_plugin("Weapon Recoil""v1.0.0""Kiske");
    
    new const 
sWeaponEntNames[][] = {"""weapon_p228""""weapon_scout""weapon_hegrenade""weapon_xm1014""weapon_c4""weapon_mac10",
    
"weapon_aug""weapon_smokegrenade""weapon_elite""weapon_fiveseven""weapon_ump45""weapon_sg550",
    
"weapon_galil""weapon_famas""weapon_usp""weapon_glock18""weapon_awp""weapon_mp5navy""weapon_m249",
    
"weapon_m3""weapon_m4a1""weapon_tmp""weapon_g3sg1""weapon_flashbang""weapon_deagle""weapon_sg552",
    
"weapon_ak47""weapon_knife""weapon_p90"};
    
    new 
i;
    for(
1sizeof(sWeaponEntNames); i++)
        if(
sWeaponEntNames[i][0]) RegisterHam(Ham_Weapon_PrimaryAttacksWeaponEntNames[i], "fw_Weapon_PrimaryAttack_Post"1);
}

public 
fw_Weapon_PrimaryAttack_Post(weapon)
{
    static 
id;
    
id get_pdata_cbase(weapon414); // Line 28
    
    
if(!pev_valid(id))
        return 
HAM_IGNORED;
    
    if(
is_user_alive(id))
        
entity_set_vector(idEV_VEC_punchangleFloat:{0.00.00.0});
    
    return 
HAM_IGNORED;


Error:
PHP Code:
L 11/18/2011 10:59:36Start of error session.
L 11/18/2011 10:59:36Info (map "zm_toxic_house") (file "addons/amxmodx/logs/error_20111118.log")
L 11/18/2011 10:59:36: [HAMSANDWICHEntity out of range (-1)
L 11/18/2011 10:59:36: [AMXXDisplaying debug trace (plugin "weap_recoil.amxx")
L 11/18/2011 10:59:36: [AMXXRun time error 10native error (native "get_pdata_cbase")
L 11/18/2011 10:59:36: [AMXX]    [0weap_recoil.sma::fw_Weapon_PrimaryAttack_Post (line 28
Line 28:
PHP Code:
id get_pdata_cbase(weapon414); 
Sometimes the number -1 changes to -1963275547 or 1709694128.


Thanks in advance!

Last edited by Kiske; 11-19-2011 at 16:27.
Kiske is offline
Send a message via Skype™ to Kiske
 


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 08:31.


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