AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   TF2Items (https://forums.alliedmods.net/forumdisplay.php?f=146)
-   -   Getting an error compiling a plugin for changing TF2 item stats (https://forums.alliedmods.net/showthread.php?t=325550)

OBV10U3_NINJA 06-26-2020 22:05

Getting an error compiling a plugin for changing TF2 item stats
 
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?

OBV10U3_NINJA 06-26-2020 22:16

Re: Getting an error compiling a plugin for changing TF2 item stats
 
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.

PC Gamer 06-26-2020 23:16

Re: Getting an error compiling a plugin for changing TF2 item stats
 
what plugin/config are you using to modify the attributes of the rocket jumper?

OBV10U3_NINJA 06-27-2020 18:17

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Quote:

Originally Posted by PC Gamer (Post 2707450)
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.

asherkin 06-27-2020 18:37

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Quote:

Originally Posted by OBV10U3_NINJA (Post 2707596)
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.

OBV10U3_NINJA 06-27-2020 19:08

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Quote:

Originally Posted by asherkin (Post 2707599)
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.

asherkin 06-27-2020 19:14

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Yes, it's just a warning.

OBV10U3_NINJA 06-27-2020 19:29

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Alright, I rebuilt it with the original code. Still getting an unknown command error however when I enter tf2items_manager_reload in the console.

OBV10U3_NINJA 06-27-2020 19:43

Re: Getting an error compiling a plugin for changing TF2 item stats
 
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.

OBV10U3_NINJA 07-18-2020 14:31

Re: Getting an error compiling a plugin for changing TF2 item stats
 
Still no progress on this. Compile after compile, tweak after tweak, I don't have any idea what I could be doing wrong.


All times are GMT -4. The time now is 17:27.

Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.