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

nvault.


Post New Thread Reply   
 
Thread Tools Display Modes
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-20-2020 , 09:36   Re: nvault.
Reply With Quote #11

If this forum had a reputation for users razio wouldn't have one as I saw in his many posts that this user is completely ignorant
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-20-2020 , 15:01   Re: nvault.
Reply With Quote #12

Quote:
Originally Posted by OciXCrom View Post
Also, I don't think there's a need to use "#" as a replacement for a whitespace. Just do "%i %i %i" directly. They're all integers, so there shouldn't be any problems.

PS: the max AuthId length is 64, not 35. You probably don't need 33 for a buffer that holds a single integer, the integer itself can't even be that big.
I've been using 34 for ages to hold steam id's. Is the max steam id length documented anywhere? Based on the below valve documentation, the number after the 2nd colon is the persons steam account number. If steam uses an unsigned 64-bit long to store the account number then even a string sized at 34 is overkill.

https://developer.valvesoftware.com/wiki/SteamID

28 characters total with the largest unsigned 64 bit long:
STEAM:0:18446744073709551615
__________________
Bugsy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-20-2020 , 15:16   Re: nvault.
Reply With Quote #13

Quote:
Originally Posted by Natsheh View Post
If this forum had a reputation for users razio wouldn't have one as I saw in his many posts that this user is completely ignorant
I'm just saying that the code can use some improvements, that's all.

Quote:
Originally Posted by Bugsy View Post
I've been using 34 for ages to hold steam id's. Is the max steam id length documented anywhere? Based on the below valve documentation, the number after the 2nd colon is the persons steam account number. If steam uses an unsigned 64-bit long to store the account number then even a string sized at 34 is overkill.

https://developer.valvesoftware.com/wiki/SteamID

28 characters total with the largest unsigned 64 bit long:
STEAM:0:18446744073709551615
I've been using 34 as well, but recently it has been defined in AMXX 1.9 as 64:

Code:
#define MAX_AUTHID_LENGTH 64

You can find more information in this PR - https://github.com/alliedmodders/amxmodx/pull/566
From what I understood, it uses 64 in the engine itself.
__________________

Last edited by OciXCrom; 01-20-2020 at 15:31.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-20-2020 , 15:26   Re: nvault.
Reply With Quote #14

So is AMX-X trying to account for when 128-bit unsigned longs become a thing, or did someone find this documented somewhere?

It's not a huge deal since we are only talking about 34-cells (possibly x 32) of memory wasted, but it doesn't make much sense to use a string variable that large. Only in Valve's wildest dreams would they be able to fill account numbers into the outer left bits of an unsigned 32-bit long, let alone in unsigned 64-bit long territory.
__________________
Bugsy 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:33.


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