Hello.
I am trying to convert a string to a long. I am able to convert the string to a long. But my string begins with a bunch of zeros (14 to be exact, bringing the total length of the string to 16). Whenever I parse it, it only keeps the last two numbers and drops all the zeros. I need it to keep the original string, and not get rid of anything in the string, keeping it’s length to 16.
The string changes very often, since it represents the id of a player, so it changes based on which player is playing. So one string could possibly contain 13 instead of the 14 mentioned above. So I would need it to work with that as well.
Is there a way to do this? Like a line of code to convert all 16 characters in the string to a long?
So far I have this:
long myLong = long.Parse(myString);
Any help is greatly appreciated.