13.11.2013, 21:05
Max Integer value is 2.1billion (21xx.xxx.xxx). I'm currently scripting a RP phone system which uses a 10 digit phone number for every player. As Max Integer value also reaches to 10 digits, it cannot go pass (in the first three prefix, aka area code) 217, while my script uses different area codes including 671 and 842. Basically my integer values are destined to cross the restrictions, making my value go below 0. I know it's not possible to mess around with the integer limits, but what I'm looking for is a workaround. Saving the number as a string in the userfile is not an option, since there will HAVE to be a time I'll be using the number as an integer which will again corrupt the value. I've thought about using two integers and joining them together each time the number is needed for printing or to show the player, but values still go below 0. Any help, much appreciated.