Jump to content
  • 0
Sign in to follow this  
Stxalth

How can I fix this?

Question

Okay hey, I'm recently trying to add a cape to my server. I got the ".mqo" and changed it into a ".dat" and added it to "Models" folder in Client (Wear/drop models). So I add ints to it in "Class8.java" and I think I did it right. Next I inserted the cape into "Items.cfg" and made the stats and stuff. Lastly I put the model into "Item.java" under the 'Cape' section right next to the 'Owner Cape'. I Compiled everything and then got this error:

Starting System...
Enforcing client requirement.
Settings Loaded Seccessfully!
Online.
Exception in thread "main" java.lang.NumberFormatException: For input string: "1
3676 "
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at ItemHandler.loadItemList(ItemHandler.java:289)
at ItemHandler.<init>(ItemHandler.java:173)
at server.main(server.java:123)
I was wondering if anyone knew if the ints were wrong or what I did wrong, Thanks!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
[quote name='Stxalth']Okay hey, I'm recently trying to add a cape to my server. I got the ".mqo" and changed it into a ".dat" and added it to "Models" folder in Client (Wear/drop models). So I add ints to it in "Class8.java" and I think I did it right. Next I inserted the cape into "Items.cfg" and made the stats and stuff. Lastly I put the model into "Item.java" under the 'Cape' section right next to the 'Owner Cape'. I Compiled everything and then got this error:

Starting System...
Enforcing client requirement.
Settings Loaded Seccessfully!
Online.
Exception in thread "main" java.lang.NumberFormatException: For input string: "1
3676 "
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at ItemHandler.loadItemList(ItemHandler.java:289)
at ItemHandler.<init>(ItemHandler.java:173)
at server.main(server.java:123)
I was wondering if anyone knew if the ints were wrong or what I did wrong, Thanks![/QUOTE]

Find the line that you added "13676 " and remove that trailing space after it.

Share this post


Link to post
Share on other sites
  • 0
Well "13676" is the Model ID and I placed that in the mentioned files. How do I know which one?

Share this post


Link to post
Share on other sites
  • 0
[quote name='Stxalth']Well "13676" is the Model ID and I placed that in the mentioned files. How do I know which one?[/QUOTE]

Whichever one has a white space following it search:
[CODE]
"13676 "
[/CODE]

The reason you are getting that error is because your client converts that String value into a number, although in your case if you have provided an illegal String to convert (it contains white spaces), so NumberFormatException is thrown.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×