You could always just do multiple stacks of money/items when they get to maxed. so when one is maxed it creates a new stack in the next available slot in your inventory or bank. Thats how i got around that issue.
|
I've seen some servers, if you stake for example, 2147m and win, the cash go automaticly to your money bag, then it dont dissappear like now, or if you will bank 2147m and already have 2147m, then it go automaticly to money bag again, how i do it?
You could always just do multiple stacks of money/items when they get to maxed. so when one is maxed it creates a new stack in the next available slot in your inventory or bank. Thats how i got around that issue.
The hell? You not suppose to allow the trade, duel, banking, etc.. to even be performed if there is any chance that item A + item B amounts exceed the max int value.
A strategy I used a lot was the below (By setting it to a long value it'll add properly and then you can check if it's greater than Integer.MAX_VALUE.
Code:if ((long)amounts[availableSlot] + amount > Integer.MAX_VALUE) { return false; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |