Page 1 of 1
negative exp
Posted: Sun Nov 06, 2005 11:03 am
by erypmav
I noticed negative exp show on the screen. If you want to look into it here is a screenshot of what I am talking about.

Posted: Sun Nov 06, 2005 11:23 am
by Rollie
Yeah, this is due to it not being able to display numbers so I high when you have a few folks in your local database. I need to spend some time rethinking this.
Posted: Fri Dec 30, 2005 9:50 pm
by RavenDT
Yeah, this has to do with basic number types in C++. An integer can only go so high before it rolls over. A "long int (signed)" can only go from -2,147,483,648 to 2,147,483,647... So once it goes higher than 2,147,483,647, it becomes -2,147,483,648. Same with an "unsigned long int" that goes from 0 to 4,294,967,295. Once it hits 4,....296, it actually goes back to 0.
The way to prevent this is a weird work around. The way we fixed this in C++ class was we made a whole seperate class that worked with characters. The class basically was a chain of characters linked together by pointers...
So 3,342,674,943,209,521,034 would be:
"4","3","0","1","2","5","9",pointer to 0->
"0","2","3","4","9","4","7",pointer to 6->
"6","2","4","3","3","null","null",null pointer
Unfortunately, I don't think you can define your own class nor can you use memory pointers in an addon, but I don't make addons, I just use them, so I wouldn't know.