Thread: [PI] ::Item Help need Please

Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1 [PI] ::Item Help need Please 
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    Okay so let me Explain here: Im Making a Spawn Server and i want to make Items Unspawnable so i followed this tutorial http://www.rune-server.org/runescape...ble-items.html

    And the Snippet says "Add this loop to your item command"

    here is the Loop
    for (int i : Constants.UNSPAWNABLE_ITEMS) {
    if (i == newItemID) {
    c.sendMessage("This item is unspawnable, obtain it a different way.");
    return;
    and here is my ::item Code:

    if (playerCommand.startsWith("item")) {
    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("That item ID does not exist.");
    }
    } else {
    c.sendMessage("Wrong usage: (Ex:ickup_ID_Amount)(::item 995 1))");
    }
    } catch(Exception e) {

    } // HERE?
    } // HERE?

    }
    Can someone Loop the code in? I will Thank you, I Know i shouldnt ask for spoonfeeding so this will be the only time
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    Really now, come on man.
    All the best,
    Nirvana

    Reply With Quote  
     

  3. #3  
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    Yeah I know Can you just help me please
    Reply With Quote  
     

  4. #4  
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    Bumperz
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Mar 2008
    Posts
    546
    Thanks given
    1
    Thanks received
    1
    Rep Power
    0
    Try it first than if you need help, come here. Try not to get spoonfed
    Reply With Quote  
     

  6. #6  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    Yeah, exactly, try and then post your errors IF you get any.
    All the best,
    Nirvana

    Reply With Quote  
     

  7. #7  
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    I tried it and now i just got an Error.....

    src\server\model\players\packets\Commands.java:101 : 'catch' without 'try'
    } catch(Exception e) {
    ^
    src\server\model\players\packets\Commands.java:101 : ')' expected
    } catch(Exception e) {
    ^
    src\server\model\players\packets\Commands.java:101 : not a statement
    } catch(Exception e) {
    ^
    src\server\model\players\packets\Commands.java:101 : ';' expected
    } catch(Exception e) {
    ^
    src\server\model\players\packets\Commands.java:84: 'try' without 'catch' or 'fin
    ally'
    try {
    ^
    src\server\model\players\packets\Commands.java:177 : illegal start of expression
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:177 : illegal start of expression
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:177 : ';' expected
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:177 : ';' expected
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:177 : not a statement
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:177 : ';' expected
    public void moderatorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : illegal start of expression
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : illegal start of expression
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : ';' expected
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : ';' expected
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : not a statement
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:268 : ';' expected
    public void administratorCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : illegal start of expression
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : illegal start of expression
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : ';' expected
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : ';' expected
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : not a statement
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:399 : ';' expected
    public void ownerCommands(Client c, String playerCommand)
    ^
    src\server\model\players\packets\Commands.java:515 : reached end of file while pa
    rsing
    } →
    ^
    24 errors
    Press any key to continue . . .
    And i thought for others it would of been easier to loop it than helping me with my errors, Anyways i guess i was wrong
    Reply With Quote  
     

  8. #8  
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    Bump!
    Reply With Quote  
     

  9. #9  
    Generation-X

    Bilsma's Avatar
    Join Date
    Feb 2011
    Posts
    691
    Thanks given
    657
    Thanks received
    45
    Rep Power
    82
    Rocky2k10 u use notepad ++ to code?
    Reply With Quote  
     

  10. #10  
    Proud User
    Join Date
    Feb 2011
    Posts
    530
    Thanks given
    69
    Thanks received
    28
    Rep Power
    29
    No and before you make fun out of me i admit that i suck at coding,
    Reply With Quote  
     

Page 1 of 3 123 LastLast

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: 1
    Last Post: 12-30-2010, 12:23 PM
  2. Replies: 2
    Last Post: 03-23-2010, 10:17 PM
  3. Replies: 23
    Last Post: 09-10-2009, 03:29 AM
  4. Replies: 26
    Last Post: 03-13-2009, 07:49 PM
  5. Replies: 20
    Last Post: 06-06-2008, 12:04 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
  •