Thread: I need help with ::item command I will rep+

Results 1 to 6 of 6
  1. #1 I need help with ::item command I will rep+ 
    Registered Member
    Join Date
    Dec 2010
    Posts
    63
    Thanks given
    1
    Thanks received
    4
    Rep Power
    1
    This is the error i get when trying adding in this command
    I will REP+ you if you can help me with this










    MY CODE:


    if (playerCommand.startsWith("item") && c.playerRights >= 3) {
    try {
    String[] args = playerCommand.split(" ");
    if (args.length == 3) {
    int newItemID = Integer.parseInt(args[1]);
    int newItemAmount = Integer.parseInt(args[2]);
    if ((newItemID <= 20000) && (newItemID >= 0)) {
    c.getItems().addItem(newItemID, newItemAmount);
    } else {
    c.sendMessage("No such item.");
    }
    } else {
    c.sendMessage("Use as ::item 995 200 for example 200 gp");
    }
    } catch(Exception e) {

    }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2013
    Posts
    1,169
    Thanks given
    28
    Thanks received
    133
    Rep Power
    53
    Remove String[] args = playerCommand.split(" ");
    If only I hadn't given you up, my life could've been different.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Dec 2010
    Posts
    63
    Thanks given
    1
    Thanks received
    4
    Rep Power
    1
    Quote Originally Posted by True Faith View Post
    Remove String[] args = playerCommand.split(" ");
    Thank you... Rep+
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Jun 2013
    Posts
    1,353
    Thanks given
    77
    Thanks received
    139
    Rep Power
    243
    Quote Originally Posted by True Faith View Post
    Remove String[] args = playerCommand.split(" ");
    1 rep power !
    http://i49.tinypic.com/1o66j6.png
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    May 2013
    Posts
    1,169
    Thanks given
    28
    Thanks received
    133
    Rep Power
    53
    Quote Originally Posted by MikeMunityPK View Post
    1 rep power !
    Obviously didn't help for rep.
    If only I hadn't given you up, my life could've been different.
    Reply With Quote  
     

  7. #6  
    Banned

    Join Date
    Aug 2007
    Posts
    4,130
    Thanks given
    0
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by True Faith View Post
    Obviously didn't help for rep.
    he only cares about rep, ignore him
    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. Replies: 8
    Last Post: 02-03-2012, 04:35 PM
  2. Replies: 5
    Last Post: 10-28-2010, 05:48 AM
  3. Replies: 4
    Last Post: 10-16-2010, 05:25 AM
  4. [508] Need help with an array list, will rep+
    By EndlessZombies in forum Help
    Replies: 5
    Last Post: 04-22-2009, 03:08 PM
  5. Need help with ::item command and master.
    By redregious in forum Help
    Replies: 16
    Last Post: 03-21-2009, 01:24 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •