Quote:
Originally Posted by Windle
Hi,
I think I'm having a similar issue:
L 11/14/2018 - 22:46 1: SourceMod error session started
L 11/14/2018 - 22:46 1: Info (map "vsh_crevice_b2") (file "errors_20181114.log")
L 11/14/2018 - 22:46 1: [tf2attributes.smx] Could not initialize call to CEconItem::SetCustomName
I have updated the gamedata but still having this issue.
Any ideas?
Liam
|
No need to worry about that, Liam. At no point in the plugin is CEconItem::SetCustomName ever used, and I think the use is deprecated. It's just a benign error, only
that part of the gamedata is out of date.
Anywho, I have my own problem.
When trying GetStaticAttribs or GetSOCAttribs on a Headtaker (or certain other entities that have m_AttributeList), my server immediately crashes with Access Violation error. Here's the log.
https://crash.limetech.org/ft3v5hoptozj
From what I managed to debug, the plugin reads 0x0001FFFF, and this immediately gives an error. I would try to fix it, but address data types are out of my league, and although I can assume how it works, I don't want to completely mess this plugin up. Is it reading an unintended address? If so, how do I get it to read from the correct address? Really just hoping this isn't just me being an idiot here..
PHP Code:
stock GetStaticAttribs(Address:pItemDef, iAttribIndices[], iAttribValues[])
{
if (!IsValidAddress(pItemDef)) return 0; //...-1 maybe?
new iNumAttribs = LoadFromAddress(pItemDef + Address:32, NumberType_Int32);
new Address:pAttribList = Address:LoadFromAddress(pItemDef + Address:20, NumberType_Int32);
for (new i = 0; i < iNumAttribs; i++) //THIS IS HOW YOU GET THE ATTRIBUTES ON AN ITEMDEF!
{
iAttribIndices[i] = LoadFromAddress(pAttribList + Address:(i * 8), NumberType_Int16);
iAttribValues[i] = LoadFromAddress(pAttribList + Address:(i * 8 + 4), NumberType_Int32);
}
return iNumAttribs;
}
Just a reminder; this is the erroneous part.