
negative exp
negative exp
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.


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.
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.