Raised This Month: $51 Target: $400
 12% 

Help with error in plugin please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ozrich
AlliedModders Donor
Join Date: Oct 2015
Old 03-18-2019 , 06:35   Help with error in plugin please
Reply With Quote #1

Hi folks,

I apologise for the generic title.

I'm receiving the below error in the sm log:

PHP Code:
L 03/18/2019 13:58:13: [SMException reportedProperty "m_hWeaponDefinitionHandle" not found (entity 402/prop_physics)
L 03/18/2019 13:58:13: [SMBlaminginsurgency.smx
L 03
/18/2019 13:58:13: [SMCall stack trace:
L 03/18/2019 13:58:13: [SM]   [0GetEntProp
L 03
/18/2019 13:58:13: [SM]   [1Line 491D:\Libraries\GIT Repos\Insurgency-dy-sourcemod\scripting\insurgency.sp::GetWeaponId
L 03
/18/2019 13:58:13: [SM]   [2Line 673D:\Libraries\GIT Repos\Insurgency-dy-sourcemod\scripting\insurgency.sp::Native_Weapon_GetWeaponId
L 03
/18/2019 13:58:13: [SM]   [4Ins_GetWeaponId
L 03
/18/2019 13:58:13: [SM]   [5Line 1527D:\Libraries\GIT Repos\Insurgency-dy-sourcemod\scripting\insurgency.sp::Event_PlayerHurt 
The function from insurgency.smx that refers to GetWeaponID is:

PHP Code:
GetWeaponId(i) {
    if (
0) {
        return -
1;
    }
    new 
m_hWeaponDefinitionHandle GetEntProp(iProp_Send"m_hWeaponDefinitionHandle");
    new 
String:name[32];
    
GetEdictClassname(inamesizeof(name));
    
decl String:strBuf[32];
    
GetArrayString(g_weap_arraym_hWeaponDefinitionHandlestrBufsizeof(strBuf));
    if(!
StrEqual(namestrBuf)) {
        
SetArrayString(g_weap_arraym_hWeaponDefinitionHandlename);
        
InsLog(DEBUG,"Weapon %s not in trie, added as index %d"name,m_hWeaponDefinitionHandle);
    }
    return 
m_hWeaponDefinitionHandle;

Now, I've checked in Netprops and the correct netprop exists: Member: m_hWeaponDefinitionHandle (offset 13944) (type integer) (bits 7) (Unsigned)

My understanding is this plugin acts as a library for other plugins to work. Description from developer github it "Provides functions to support Insurgency. Includes logging, round statistics, weapon names, player class names, and more."

I'm not even sure if it's still relevant given the work Daimyo has done with his plugins. If anyone could assist I'd greatly appreciate it.
__________________
ozrich is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 03-18-2019 , 07:12   Re: Help with error in plugin please
Reply With Quote #2

As the error message says you are trying to retrieve the m_hWeaponDefinitionHandle from a prop_physics which doesn't have that prop. You would have to make sure that it is a weapon before trying to read the m_hWeaponDefinitionHandle prop
xerox8521 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:55.


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