❔ Maximum value in a text box
Trying to get a text box to have a max value of 2147483647/int32 limit. It works fine for setting things to 0 if they're below it but above 2147483647 isn't working, the message box won't show either
8 Replies
Please read what you just typed again, you're trying to set an int to higher than the max int value?
Hm?
It's 4 bytes
I want to make it so if the value in the text box is above 2,147,483,647 then it sets the text to 2,147,483,647
But value can never be greater than 2147484647?
You're going to need to parse it into a long (64 bit int)...clearly you can't have an int value greater than the maximum int value...that's a contradiction
Right, sorry I had a brain malfunction. Thanks
If it's guaranteed to never be negative you might also be able to use unsigned int instead of long
Depending on your actual needs.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.