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

[TF2] TF2Attributes (v1.7.2, 2022/09/18)


Post New Thread Reply   
 
Thread Tools Display Modes
HelpMe
Senior Member
Join Date: Jun 2013
Location: Home
Old 08-11-2018 , 09:15   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #561

Update the gamedata
HelpMe is offline
Windle
Member
Join Date: Feb 2014
Location: Lancashire
Old 11-14-2018 , 16:54   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #562

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
Windle is offline
Send a message via MSN to Windle
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
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 11-23-2018 , 05:15   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #564

Compile the plugin on GitHub, the plugin attached to this thread has an outdated hardcoded offset.
__________________
Benoist3012 is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 11-27-2018 , 06:39   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #565

Code:
L 11/27/2018 - 19:38:23: [SM] Exception reported: Could not initialize call to GEconItemSchema
L 11/27/2018 - 19:38:23: [SM] Blaming: tf2attributes.smx
L 11/27/2018 - 19:38:23: [SM] Call stack trace:
L 11/27/2018 - 19:38:23: [SM]   [0] SetFailState
L 11/27/2018 - 19:38:23: [SM]   [1] Line 115, E:\tf2 Server\steamapps\common\Team Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting\tf2attributes.sp::OnPluginStart
L 11/27/2018 - 19:38:24: [tf2attributes.smx] Could not initialize call to CEconItemSchema::GetItemDefinition
L 11/27/2018 - 19:38:24: [tf2attributes.smx] Could not initialize call to CEconItemView::GetSOCData
L 11/27/2018 - 19:38:24: [SM] Exception reported: Could not initialize call to GEconItemSchema
L 11/27/2018 - 19:38:24: [SM] Blaming: tf2attributes.smx
L 11/27/2018 - 19:38:24: [SM] Call stack trace:
L 11/27/2018 - 19:38:24: [SM]   [0] SetFailState
L 11/27/2018 - 19:38:24: [SM]   [1] Line 115, E:\tf2 Server\steamapps\common\Team Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting\tf2attributes.sp::OnPluginStart
L 11/27/2018 - 19:38:25: [tf2attributes.smx] Could not initialize call to CEconItemSchema::GetItemDefinition
L 11/27/2018 - 19:38:25: [tf2attributes.smx] Could not initialize call to CEconItemView::GetSOCData
L 11/27/2018 - 19:38:25: [SM] Exception reported: Could not initialize call to GEconItemSchema
L 11/27/2018 - 19:38:25: [SM] Blaming: tf2attributes.smx
L 11/27/2018 - 19:38:25: [SM] Call stack trace:
L 11/27/2018 - 19:38:25: [SM]   [0] SetFailState
L 11/27/2018 - 19:38:25: [SM]   [1] Line 115, E:\tf2 Server\steamapps\common\Team Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting\tf2attributes.sp::OnPluginStart
L 11/27/2018 - 19:38:25: [tf2attributes.smx] Could not initialize call to CEconItemSchema::GetItemDefinition
L 11/27/2018 - 19:38:25: [tf2attributes.smx] Could not initialize call to CEconItemView::GetSOCData
L 11/27/2018 - 19:38:25: [SM] Exception reported: Could not initialize call to GEconItemSchema
L 11/27/2018 - 19:38:25: [SM] Blaming: tf2attributes.smx
L 11/27/2018 - 19:38:25: [SM] Call stack trace:
L 11/27/2018 - 19:38:25: [SM]   [0] SetFailState
L 11/27/2018 - 19:38:25: [SM]   [1] Line 115, E:\tf2 Server\steamapps\common\Team Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting\tf2attributes.sp::OnPluginStart
__________________
sv_downloadurl Recommended FREE website
000webhost(File is too big (max. 32MB)! Upload will be skipped.)
rejetto
(Local_computer_host)
Getting material/model paths easy way (Windows)
steam profile
Youtube
zyox123cc is offline
iamf2p
Member
Join Date: Nov 2018
Old 12-01-2018 , 18:07   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #566

TF2Attrib_SetByName(client, "clip size bonus", 1.5); // isn't working....
TF2Attrib_SetByDefIndex(client, 4, 1.5); //isn't working too

how can I fix this?
iamf2p is offline
JoinedSenses
Senior Member
Join Date: Sep 2013
Old 12-01-2018 , 18:56   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #567

Quote:
Originally Posted by iamf2p View Post
TF2Attrib_SetByName(client, "clip size bonus", 1.5); // isn't working....
TF2Attrib_SetByDefIndex(client, 4, 1.5); //isn't working too

how can I fix this?
I cant give a good answer without seeing the code, but as far as I know, you would have to set the attribute on the client's weapon, which means you would have to use GetPlayerWeaponSlot
https://sm.alliedmods.net/new-api/sd...ayerWeaponSlot

Code:
/*
TFWeaponSlot_Primary,
TFWeaponSlot_Secondary,
TFWeaponSlot_Melee,
TFWeaponSlot_Grenade,
TFWeaponSlot_Building,
TFWeaponSlot_PDA,
TFWeaponSlot_Item1,
TFWeaponSlot_Item2
*/
int slot = whatever slot you want to change 
int weapon = GetPlayerWeaponSlot(client, slot);
TF2Attrib_SetByDefIndex(weapon, 4, 1.5);

Last edited by JoinedSenses; 12-01-2018 at 20:36.
JoinedSenses is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-02-2018 , 14:20   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #568

When I set the Strange Kill Count to a random integer between 0 and 9000, I launch the game and I see a value bigger than 100 million, Why?

EDIT: Nevermind I fixed it.

Last edited by manicogaming; 12-02-2018 at 14:52. Reason: Problem Fixed
manicogaming is offline
arynn24
New Member
Join Date: Dec 2018
Old 12-29-2018 , 23:18   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #569

When I boot up my server, the plugin gives me a single error,
Code:
[tf2attributes.smx] Could not initialize call to CEconItem::SetCustomName
I've added every tf2attribute files to their respective files.
arynn24 is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-29-2018 , 23:42   Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
Reply With Quote #570

Quote:
Originally Posted by arynn24 View Post
When I boot up my server, the plugin gives me a single error,
Code:
[tf2attributes.smx] Could not initialize call to CEconItem::SetCustomName
I've added every tf2attribute files to their respective files.
Did you download the tf2.attributes.txt file from GitHub and place it in your sourcemod/gamedata folder? (link:https://github.com/FlaminSarge/tf2attributes )
Attached Files
File Type: txt tf2.attributes.txt (3.2 KB, 201 views)
PC Gamer is offline
Reply


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 20:26.


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