Board Thread:Questions and Answers/@comment-24031030-20131009155601

I'm working on an RPG and using the GRP data saving technique to save all game data. I've actually ran into a problem, however. Most variables are fine and nothing ever exceeds 255, except for one set of variables. For all the skills I have in my game, I have experience points for each. These numbers are supposed to be able to reach around 13 million. I thought of a technique, but I was wondering if there would be any better option:

Let's say I have a variable called WOODCUTXP that stores 13,452. I wanted to alot 3 pixels for this variable, so it would be like this:

1,1 would hold 000

1,2 would hold 013

1,3 would hold 452

Then I would convert them to strings, add them together, and convert back to an integer. The issue with this, however, is that it's difficult to store them in the first place. If I convert 13,452 into a string, I would need to separate it into 3 parts, like above. The problem is, I don't know that the player has that exact amount of experience points. I don't know how exactly to convert that to  "000"+"013"+"452". They could have only 1 experience point. So I need to know how to convert it to a string, analyze the size of the string, and then add zeros to the front based on the size. How can I do this? 