Raised This Month: $ Target: $400
 0% 

Getting an error compiling a plugin for changing TF2 item stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-26-2020 , 23:05   Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #1

A mod by asherkin has decided to be a bit of a problem, I'm trying to get rocket jumpers with a ludicrous amount of ammo. I'm getting this error -

"tf2items_manager.sp(176) : warning 234: symbol "GetClientAuthString" is marked as deprecated: Use GetClientAuthId"

After going into the sp file I found only one occurrence of the bad symbol.
Handle:FindItem(iClient, iItemDefinitionIndex)
{
// Check if the player is valid
if (!IsValidClient(iClient))
return INVALID_HANDLE;

// Retrieve the STEAM auth string
new String:strAuth[64];
GetClientAuthString(iClient, strAuth, sizeof(strAuth));

// Check if it's on the list. If not, try with the global settings.
new Handle:hItemArray = INVALID_HANDLE;
GetTrieValue(g_hPlayerInfo, strAuth, hItemArray);

// Check for each.
new Handle:hOutput;
hOutput = FindItemOnArray(iClient, hItemArray, iItemDefinitionIndex);
if (hOutput == INVALID_HANDLE)
hOutput = FindItemOnArray(iClient, g_hGlobalSettings, iItemDefinitionIndex);

// Done
return hOutput;
}


What's the proper syntax for the recommended replacement, and will it work?

Last edited by Dubswitcher; 06-26-2020 at 23:06.
Dubswitcher is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-26-2020 , 23:16   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #2

Ok, I feel stupid now, I just googled it and found it in the API.

All I needed to do was add AuthId_Steam3 as a new parameter between the first and second one, and replace the old GetClientAuthString with GetClientAuthId. It started working after that.



... I still don't know what I'm doing however. I'm trying to get the plugin to work but it's not really doing anything on the server. It's just not throwing errors.

Last edited by Dubswitcher; 06-26-2020 at 23:36.
Dubswitcher is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 06-27-2020 , 00:16   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #3

what plugin/config are you using to modify the attributes of the rocket jumper?
PC Gamer is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-27-2020 , 19:17   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #4

Quote:
Originally Posted by PC Gamer View Post
what plugin/config are you using to modify the attributes of the rocket jumper?
I was actually starting from this post. I had done a google search for a mod that would allow what I'm looking for.
https://forums.alliedmods.net/showthread.php?t=194346

I should also mention that after following the instructions for the mod that the post leads to, the command "tf2items_manager_reload" still does nothing in the srcds console.

The syntax for the tf2items.weapons.txt is also extremely complicated to follow and scattered. I've been able to find about only half of what all of it means.

Last edited by Dubswitcher; 06-27-2020 at 19:22.
Dubswitcher is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-27-2020 , 19:37   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #5

Quote:
Originally Posted by OBV10U3_NINJA View Post
I was actually starting from this post. I had done a google search for a mod that would allow what I'm looking for.
https://forums.alliedmods.net/showthread.php?t=194346

I should also mention that after following the instructions for the mod that the post leads to, the command "tf2items_manager_reload" still does nothing in the srcds console.

The syntax for the tf2items.weapons.txt is also extremely complicated to follow and scattered. I've been able to find about only half of what all of it means.
Have you read the FAQ thread? It has an annotated explanation of the config.

The edit you've made to use GetClientAuthId with AuthId_Steam3 will have changed the SteamID format used in the config though - I'd suggest you revert that and use the plugin source as-provided.
__________________
asherkin is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-27-2020 , 20:08   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
The edit you've made to use GetClientAuthId with AuthId_Steam3 will have changed the SteamID format used in the config though - I'd suggest you revert that and use the plugin source as-provided.
I had started with how it came, but the problem was that it was saying GetClientAuthString is marked as deprecated.
Dubswitcher is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-27-2020 , 20:14   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #7

Yes, it's just a warning.
__________________
asherkin is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-27-2020 , 20:29   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #8

Alright, I rebuilt it with the original code. Still getting an unknown command error however when I enter tf2items_manager_reload in the console.
Dubswitcher is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 06-27-2020 , 20:43   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #9

I've just modified the stats code for the rocket jumper in the tf2items.weapons.txt file, from what it was before, to this -

Code:
 "custom_weapons_v3"
{
	"*"
	{
		"237"
		{
			"quality"		"1"
			"level"			"1"

			"1"				"4 ; 20"
			"2"				"76 ; 40"
		}
	}
}
I don't really know if this is any better or not as I'm still getting no visible response from it. Command to reload the tf2items manager still doesn't work.

Last edited by Dubswitcher; 06-28-2020 at 10:18.
Dubswitcher is offline
Dubswitcher
Junior Member
Join Date: Jun 2020
Old 07-18-2020 , 15:31   Re: Getting an error compiling a plugin for changing TF2 item stats
Reply With Quote #10

Still no progress on this. Compile after compile, tweak after tweak, I don't have any idea what I could be doing wrong.
Dubswitcher 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 12:42.


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