just change the max to the highest which is 2^31-1 or 2Bil(with alot of other numbers)
|
|
Topic title says it.
Every time a player tries to pickup a amount higher than the server limit is you get this error
Would i just make an If statement telling if the max typed amount is > than the max limit of the server can handle do i just make a sendmessage tooCode:E: java.lang.NumberFormatException: For input string: "9999999999" E: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) E: at java.lang.Integer.parseInt(Integer.java:459) E: at java.lang.Integer.parseInt(Integer.java:497) E: at client.customCommand(client.java:7637) E: at client.parseIncomingPackets(client.java:14020) E: at client.packetProcess(client.java:16384) E: at PlayerHandler.process(PlayerHandler.java:289) E: at process.run(process.java:23) E: at java.lang.Thread.run(Thread.java:619)![]()


just change the max to the highest which is 2^31-1 or 2Bil(with alot of other numbers)
Isn't this over the max tho![]()


max for an int is 2.47m you can make it longer by using a long to store your item amounts but you'd have to change ALOT in your server and it might not even work.. Theres no way to fix that error because an int has a limit and exceeding this limit isa problem
Well, Okay thank you for helping.


numberformatexcption is when you try to parse an int from a string and the string gets converted.
| « Need help with auto restarter for my VPS | Need dueling help.....For the 8th time » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |