Welcome to the Builder Academy

Question Saving/Loading long long ints and higher.

More
10 Jun 2016 02:08 #5994 by Liko
Hello,
So I was able to use a long long int to break the 2.1b number cap. The issue I am having is having saving and loading these types of ints. It looks like it is saving my variable IE(testing 10,000,000,000) is showing saved in the plrfile even after logout. Once I log back in tho it shows: 1,410,065,408. Now I am thinking load_char isn't loading the long long int and instead is treating it as a long or long int.

Any ideas?

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
10 Jun 2016 22:45 #5995 by thomas
try loading using atoll() instead of atoi() for that line. Be advised that the function may not be available ony uor system ( linux.die.net/man/3/atoll ). If it isn't you may need to roll your own number parser.
The following user(s) said Thank You: Liko

Please Log in or Create an account to join the conversation.

More
10 Jun 2016 23:01 #5996 by Liko

thomas wrote: try loading using atoll() instead of atoi() for that line. Be advised that the function may not be available ony uor system ( linux.die.net/man/3/atoll ). If it isn't you may need to roll your own number parser.


Worked like a charm! So glad I learned about long long int it fixes my number for powerlevel.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
10 Jun 2016 23:19 #5998 by Liko
This is purty:


<PL: 10,000,000,000/9,223,372,036,8510,000,000,000>

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
10 Jun 2016 23:43 #5999 by Liko
Also got do_set to set higher numbers!


Liko's powerlevel set to 100,000,000,000,000.

<PL: 100,000,000,000,000/100,000,000,000,100,000,000,000,000>

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.506 seconds