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

Fix SteamIDs for the new update


Post New Thread Reply   
 
Thread Tools Display Modes
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 01-17-2015 , 14:26   Re: Fix SteamIDs for the new update
Reply With Quote #61

I never used that random Steam3 fix provided by that other person which is probably why you have 2 entries per player as it allows your hlstats to receive both Steam2 and Steam3 ids. My fix only allows you to receive Steam3 and requires you to convert everything to Steam3 in the database which prevents all possible problems that you see now.

We also don't use the hlstats sourcemod plugin which is probably sending Steam2. You probably need to edit the plugin to correct this. Please don't ask me for help with this though because we are never going to use it.

Also I was about to answer you on IRC but you left.
__________________
bottiger is offline
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 01-17-2015 , 14:27   Re: Fix SteamIDs for the new update
Reply With Quote #62

Quote:
Originally Posted by bottiger View Post
I never used that random Steam3 fix provided by that other person which is probably why you have 2 entries per player as it allows your hlstats to receive both Steam2 and Steam3 ids. My fix only allows you to receive Steam3 and requires you to convert everything to Steam3 in the database which prevents all possible problems that you see now.

We also don't use the hlstats sourcemod plugin which is probably sending Steam2. You probably need to edit the plugin to correct this. Please don't ask me for help with this though because we are never going to use it.

Also I was about to answer you on IRC but you left.
I'm talking about this one.
Quote:
Originally Posted by bottiger View Post
You can update hlstats to use the new format internally by running this SQL command

Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=SUBSTR(uniqueId, 1, 1)+SUBSTR(uniqueId, 3)*2 WHERE uniqueId REGEXP('[01]:[0-9]+')
And replacing the $uniqueid in hlstats.pl sub getPlayerInfo with this.

Code:
                $uniqueid =~ /^\[U:1:(\d+)\]/;
                $uniqueid = $1;
There are few other cosmetic changes such as searching and player display which shouldn't be too difficult to figure out and I am sure the hlstats team will do.
EDIT: After re-install, and removing the superlogs plugin. It's fixed!
__________________

Last edited by Sarabveer; 01-17-2015 at 15:05.
Sarabveer is offline
delidolu1genc
Member
Join Date: Feb 2013
Location: Belgium
Old 01-23-2015 , 22:18   Re: Fix SteamIDs for the new update
Reply With Quote #63

Persons experiencing the same problem. Try the files on the bottom.
Attached Files
File Type: zip scripts.zip (47.4 KB, 369 views)
delidolu1genc is offline
Send a message via MSN to delidolu1genc Send a message via Skype™ to delidolu1genc
Sarabveer
Veteran Member
Join Date: Feb 2014
Old 01-24-2015 , 09:05   Re: Fix SteamIDs for the new update
Reply With Quote #64

Quote:
Originally Posted by delidolu1genc View Post
Persons experiencing the same problem. Try the files on the bottom.
Nice job, using the WRONG fix.

https://forums.alliedmods.net/showpo...2&postcount=17

Your supposed to use that one.
__________________
Sarabveer is offline
FallenNT
Member
Join Date: Feb 2013
Location: Russia
Old 02-14-2015 , 15:12   Re: Fix SteamIDs for the new update
Reply With Quote #65

I run this script
Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=SUBSTR(uniqueId, 1, 1)+SUBSTR(uniqueId, 3)*2 WHERE uniqueId REGEXP('[01]:[0-9]+')
Now all STEAM ID in the statistics of the players have become completely different, ie, in general, all the figures were replaced by ...

Can anybody help me to return everything back as it was standard or suggest what you can do everything in the script returns the standard values? Well, or cure it somehow.

Last edited by FallenNT; 02-14-2015 at 15:14.
FallenNT is offline
Send a message via ICQ to FallenNT
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 02-14-2015 , 18:44   Re: Fix SteamIDs for the new update
Reply With Quote #66

Quote:
Originally Posted by FallenNT View Post
I run this script
Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=SUBSTR(uniqueId, 1, 1)+SUBSTR(uniqueId, 3)*2 WHERE uniqueId REGEXP('[01]:[0-9]+')
Now all STEAM ID in the statistics of the players have become completely different, ie, in general, all the figures were replaced by ...

Can anybody help me to return everything back as it was standard or suggest what you can do everything in the script returns the standard values? Well, or cure it somehow.
"replaced by ..." doesn't really make any sense. Does the table show the new values as "..." or what exactly do you mean there?

Anyway -

Account ID: 4691
Steam ID : STEAM_0:1:2345
Steam 3 : [U:1:4691]
SteamID64 : 76561197960270419

Standard on my installation for STEAM_0:1:2345 is to have the uniqueId as "1:2345" in this specific example.

My installation seems return the account id "4691" with your query above, so assuming this is also what happened in your case - you should simply half all the values (without decimals), and then add "0:" in front of it for the full numbers, or "1:" if the it was a half number.

Code:
CONCAT(IF(((4691 / 2) % 1) > 0, 1, 0), ":", TRUNCATE((4691 / 2), 0))
returns "1:2345"

A query like this should return all the previous converted ones back to the standard of "1:2345" format:

Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=CONCAT(IF(((uniqueId / 2) % 1) > 0, 1, 0), ":", TRUNCATE((uniqueId / 2), 0)) WHERE uniqueId REGEXP("^[0-9]{1,}$")
NOTE: This query doesn't take account for anything which happened to your database from the time you made the above query, and until the time this query is executed. So if you left your statistics running after this "mess up" was made, you may have some players which technically exists multiple times (one for the old format, one for the new).
In order to fix that, you will have to go manually through the bogus ones to remove them.

Without providing a guarantee - I still hope that this will help you to get most of it back to normal.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
FallenNT
Member
Join Date: Feb 2013
Location: Russia
Old 02-15-2015 , 03:50   Re: Fix SteamIDs for the new update
Reply With Quote #67

When I tried to run a query
Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=CONCAT(IF(((4691 / 2) % 1) > 0, 1, 0), ":", TRUNCATE((4691 / 2), 0)) WHERE uniqueId REGEXP("^[0-9]{1,}$")
I received a response from the database
Code:
#1062 - Duplicate entry '1:2345-css' for key 'PRIMARY'
FallenNT is offline
Send a message via ICQ to FallenNT
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 02-19-2015 , 09:19   Re: Fix SteamIDs for the new update
Reply With Quote #68

Quote:
Originally Posted by arne1288 View Post
Anyway -

Account ID: 4691
Steam ID : STEAM_0:1:2345
Steam 3 : [U:1:4691]
SteamID64 : 76561197960270419

Standard on my installation for STEAM_0:1:2345 is to have the uniqueId as "1:2345" in this specific example.

My installation seems return the account id "4691" with your query above, so assuming this is also what happened in your case - you should simply half all the values (without decimals), and then add "0:" in front of it for the full numbers, or "1:" if the it was a half number.

Code:
CONCAT(IF(((4691 / 2) % 1) > 0, 1, 0), ":", TRUNCATE((4691 / 2), 0))
returns "1:2345"
Here you got an explanation on how things can be calculated with that specific "example Steam ID".


Quote:
Originally Posted by arne1288 View Post
A query like this should return all the previous converted ones back to the standard of "1:2345" format:

Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=CONCAT(IF(((uniqueId / 2) % 1) > 0, 1, 0), ":", TRUNCATE((uniqueId / 2), 0)) WHERE uniqueId REGEXP("^[0-9]{1,}$")
NOTE: [...]
There you were spoon-fed with the exact query to run.... A thing which is actually very rare on the Internet...

Quote:
Originally Posted by FallenNT View Post
When I tried to run a query
Code:
UPDATE hlstats_PlayerUniqueIds SET uniqueId=CONCAT(IF(((4691 / 2) % 1) > 0, 1, 0), ":", TRUNCATE((4691 / 2), 0)) WHERE uniqueId REGEXP("^[0-9]{1,}$")
I received a response from the database
Code:
#1062 - Duplicate entry '1:2345-css' for key 'PRIMARY'
You were spoon-fed with the exact query that would have adjusted everything for you at once, and still you choose to MODIFY the query before you run it. Why exactly can't you follow the statements exactly?

If you're unable to follow the exact statements you're given, no one will ever be able to help you.

Since you choose rewrote the query first, it caused the first row of the hlstats_PlayerUniqueIds table to be rewritten, thereby destroying the user on the first row (unless you have backup, or know what ID was there, ... etc).
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
BatyaMedic
Member
Join Date: Sep 2014
Old 02-20-2015 , 09:58   Re: Fix SteamIDs for the new update
Reply With Quote #69

SteamID`s in my stats looks like STEAM_0:[U:1:108244334]
What fix i should use?
BatyaMedic is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 02-24-2015 , 19:18   Re: Fix SteamIDs for the new update
Reply With Quote #70

Quote:
Originally Posted by Sarabveer View Post
I'm talking about this one.


EDIT: After re-install, and removing the superlogs plugin. It's fixed!

I do believe I have this same issue cept removing superlogs isn't something I can do mostly since I need superlogs to be present for HLSW to log properly so at this point I'm damned if I do and damned if I don't. Know of a fix that doesn't include removing superlogs to prevent the doubled up users in the DB?
Horsedick is offline
Reply



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 13:28.


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