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: [SM] Exception reported: Property "m_hWeaponDefinitionHandle" not found (entity 402/prop_physics)
L 03/18/2019 - 13:58:13: [SM] Blaming: insurgency.smx
L 03/18/2019 - 13:58:13: [SM] Call stack trace:
L 03/18/2019 - 13:58:13: [SM] [0] GetEntProp
L 03/18/2019 - 13:58:13: [SM] [1] Line 491, D:\Libraries\GIT Repos\Insurgency-dy-sourcemod\scripting\insurgency.sp::GetWeaponId
L 03/18/2019 - 13:58:13: [SM] [2] Line 673, D:\Libraries\GIT Repos\Insurgency-dy-sourcemod\scripting\insurgency.sp::Native_Weapon_GetWeaponId
L 03/18/2019 - 13:58:13: [SM] [4] Ins_GetWeaponId
L 03/18/2019 - 13:58:13: [SM] [5] Line 1527, D:\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 (i < 0) {
return -1;
}
new m_hWeaponDefinitionHandle = GetEntProp(i, Prop_Send, "m_hWeaponDefinitionHandle");
new String:name[32];
GetEdictClassname(i, name, sizeof(name));
decl String:strBuf[32];
GetArrayString(g_weap_array, m_hWeaponDefinitionHandle, strBuf, sizeof(strBuf));
if(!StrEqual(name, strBuf)) {
SetArrayString(g_weap_array, m_hWeaponDefinitionHandle, name);
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.
__________________