View Single Post
ProfessorHeavy
New Member
Join Date: Apr 2014
Old 11-22-2018 , 14:04   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #563

Quote:
Originally Posted by Windle View Post
Hi,

I think I'm having a similar issue:

L 11/14/2018 - 22:461: SourceMod error session started
L 11/14/2018 - 22:461: Info (map "vsh_crevice_b2") (file "errors_20181114.log")
L 11/14/2018 - 22:461: [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:pItemDefiAttribIndices[], iAttribValues[])
{
    if (!
IsValidAddress(pItemDef)) return 0;    //...-1 maybe?
    
new iNumAttribs LoadFromAddress(pItemDef Address:32NumberType_Int32);
    new 
Address:pAttribList Address:LoadFromAddress(pItemDef Address:20NumberType_Int32);
    for (new 
0iNumAttribsi++)    //THIS IS HOW YOU GET THE ATTRIBUTES ON AN ITEMDEF!
    
{
        
iAttribIndices[i] = LoadFromAddress(pAttribList Address:(8), NumberType_Int16);
        
iAttribValues[i] = LoadFromAddress(pAttribList Address:(4), NumberType_Int32);
    }
    return 
iNumAttribs;

Just a reminder; this is the erroneous part.
ProfessorHeavy is offline