Thread: Well of xp problem 718

Results 1 to 7 of 7
  1. #1 Well of xp problem 718 
    Registered Member chucky009's Avatar
    Join Date
    Aug 2011
    Posts
    355
    Thanks given
    1
    Thanks received
    26
    Rep Power
    0
    Hey whenever i add this to WorldPacketsDecoder.java i get this error:

    Code:
    		           else if (player.getTemporaryAttributtes().get("donate_xp_well") == Boolean.TRUE) {
    		                try {
    		                    XPWell.donate(player, Integer.parseInt(value));
    		                    player.getTemporaryAttributtes().put("donate_xp_well", Boolean.FALSE);
    		                } catch (Exception e) {
    		                    player.getDialogueManager().startDialogue("SimpleMessage", "Invalid format.");
    		                }
    		            }
    Eclipse says its the problem with the "Int" But when i change it to String it will give alot of errors and im not sure how to fix this..
    Eclipse says that:
    The method parseInt(String) in the type Integer is not applicable for the arguments (int)

    Screenshot by Lightshot
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by chucky009 View Post
    Hey whenever i add this to WorldPacketsDecoder.java i get this error:

    Code:
    		           else if (player.getTemporaryAttributtes().get("donate_xp_well") == Boolean.TRUE) {
    		                try {
    		                    XPWell.donate(player, Integer.parseInt(value));
    		                    player.getTemporaryAttributtes().put("donate_xp_well", Boolean.FALSE);
    		                } catch (Exception e) {
    		                    player.getDialogueManager().startDialogue("SimpleMessage", "Invalid format.");
    		                }
    		            }
    Eclipse says its the problem with the "Int" But when i change it to String it will give alot of errors and im not sure how to fix this..
    Eclipse says that:
    The method parseInt(String) in the type Integer is not applicable for the arguments (int)

    Screenshot by Lightshot
    You need to move the whole thing from Under this:

    Code:
    ENTER_STRING_PACKET
    to Under this
    Code:
    ENTER_INTEGER_PACKET
    Project thread
    Reply With Quote  
     

  3. #3  
    Aldor Manager


    Join Date
    Mar 2014
    Age
    28
    Posts
    1,234
    Thanks given
    200
    Thanks received
    297
    Rep Power
    2459
    Quote Originally Posted by chucky009 View Post
    Hey whenever i add this to WorldPacketsDecoder.java i get this error:

    Code:
    		           else if (player.getTemporaryAttributtes().get("donate_xp_well") == Boolean.TRUE) {
    		                try {
    		                    XPWell.donate(player, Integer.parseInt(value));
    		                    player.getTemporaryAttributtes().put("donate_xp_well", Boolean.FALSE);
    		                } catch (Exception e) {
    		                    player.getDialogueManager().startDialogue("SimpleMessage", "Invalid format.");
    		                }
    		            }
    Eclipse says its the problem with the "Int" But when i change it to String it will give alot of errors and im not sure how to fix this..
    Eclipse says that:
    The method parseInt(String) in the type Integer is not applicable for the arguments (int)

    Screenshot by Lightshot
    XPWell.donate(player, value); this will by also work..
    Attached image

    Respect goes to everyone as he deserves.
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Mar 2013
    Age
    24
    Posts
    1,767
    Thanks given
    335
    Thanks received
    386
    Rep Power
    318
    Quote Originally Posted by clem585 View Post
    You need to move the whole thing from Under this:

    Code:
    ENTER_STRING_PACKET
    to Under this
    Code:
    ENTER_INTEGER_PACKET
    No idea what your on about...

    Quote Originally Posted by Rune-Factory View Post
    XPWell.donate(player, value); this will by also work..
    ^ Yes, that would work.

    @OP, replace that line with:

    Code:
    XPWell.donate(player, value);
    or
    Code:
    XPWell.donate(player, Integer.valueOf(value));
    #parseInt(String value) or type Integer cannot parse an integer.
    Reply With Quote  
     

  5. #5  
    Registered Member chucky009's Avatar
    Join Date
    Aug 2011
    Posts
    355
    Thanks given
    1
    Thanks received
    26
    Rep Power
    0
    Quote Originally Posted by Desi View Post
    No idea what your on about...



    ^ Yes, that would work.

    @OP, replace that line with:

    Code:
    XPWell.donate(player, value);
    or
    Code:
    XPWell.donate(player, Integer.valueOf(value));
    #parseInt(String value) or type Integer cannot parse an integer.
    Thanks for learning me that!~ Btw could u add me on skype? Pm me ur skype have some questions.
    Reply With Quote  
     

  6. #6  
    Registered Member chucky009's Avatar
    Join Date
    Aug 2011
    Posts
    355
    Thanks given
    1
    Thanks received
    26
    Rep Power
    0
    It wont add the gp to the well:/ I did the objecthandler part looks like this:
    Code:
                        if (object.getId() == 43096 && itemId == 995) {
                            XPWell.give(player);
                            XPWell.donate(player, itemId);
                        }
    Reply With Quote  
     

  7. #7  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    937
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    Quote Originally Posted by chucky009 View Post
    It wont add the gp to the well:/ I did the objecthandler part looks like this:
    Code:
                        if (object.getId() == 43096 && itemId == 995) {
                            XPWell.give(player);
                            XPWell.donate(player, itemId);
                        }
    You're not running the script to enter in the amount of coins you want to 'donate'?

    You're donating itemId?
    "Real programmers don't comment their code. If it was hard to write, it should be hard to understand." - Unkown
    “ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ” - Martin Fowler
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Gamers - Beware of driver problems
    By Colby in forum Software
    Replies: 11
    Last Post: 03-05-2010, 02:53 AM
  2. Amount of xp
    By Gluon in forum Requests
    Replies: 2
    Last Post: 07-23-2009, 12:34 PM
  3. abit of a problem
    By George in forum Help
    Replies: 6
    Last Post: 05-02-2009, 08:28 PM
  4. Replies: 2
    Last Post: 04-10-2009, 04:58 PM
  5. [Help]Windows Xp Problem[Help]
    By Dj T3nSiOnN in forum Software
    Replies: 1
    Last Post: 12-16-2008, 02:27 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •