Thread: (PI) click item and then message appears to everyone (in clickitem.java)

Results 1 to 6 of 6
  1. #1 (PI) click item and then message appears to everyone (in clickitem.java) 
    Registered Member
    Join Date
    May 2011
    Posts
    36
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    this is what i use, and it doesnt work

    if(itemId == 15004) {
    c.getItems().deleteItem(15004, 1);
    c.getItems().addItem(c.getPA().randomQuestkit(), 1);
    c.getItems().addItem(9813,1);
    c.getItems().addItem(9814,1);
    c.getItems().addItem(7592,1);
    c.getItems().addItem(7593,1);
    c.getItems().addItem(7594,1);
    c.getItems().addItem(7595,1);
    c.getItems().addItem(7596,1);
    c.getItems().addItem(14600,1);
    c.getItems().addItem(14602,1);
    c.getItems().addItem(14603,1);
    c.getItems().addItem(14605,1);
    c.getItems().addItem(11235,1);
    c.getItems().addItem(10735,1);
    c.sendMessage("<col=1532693>You open the Quest kit (Elite)</col>");
    String msg = playerCommand.substring(6);
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    if (Server.playerHandler.players[i] != null) {
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.sendMessage("-" + playerName + "- Just opened a Quest Kit [Elite]!");

    }
    }
    }



    this error:

    src\server\model\players\packets\ClickItem.java:39 : error: cannot find symbol
    String msg = playerCommand.substring(6);
    ^
    symbol: variable playerCommand
    location: class ClickItem
    src\server\model\players\packets\ClickItem.java:40 : error: cannot find symbol
    for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    ^
    symbol: variable Config
    location: class ClickItem
    src\server\model\players\packets\ClickItem.java:41 : error: package Server does n
    ot exist
    if (Server.playerHandler.players[i] != n
    ull) {
    ^
    src\server\model\players\packets\ClickItem.java:42 : error: package Server does n
    ot exist
    Client c2 = (Client)Server.play
    erHandler.players[i];
    ^
    src\server\model\players\packets\ClickItem.java:43 : error: cannot find symbol
    c2.sendMessage("-" + playerName
    + "- Just opened a Quest Kit [Elite]!");
    ^
    symbol: variable playerName
    location: class ClickItem
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    5 errors
    press any key to continue...
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    y the fuck are u declaring a message using playercommand in clickitem
    [Only registered and activated users can see links. ]


    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2011
    Posts
    36
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by phl0w View Post
    y the fuck are u declaring a message using playercommand in clickitem
    dude why are you so pissed? just dont post anything if you are so negative, the help section is for help. what do u expect?
    Reply With Quote  
     

  4. #4  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    i'm not pissed you're just retarded


    Replace anything below
    Code:
    c.sendMessage("<col=1532693>You open the Quest kit (Elite)</col>");
    with
    Code:
    for (Player p : PlayerHandler.players) {
    if (p != null) {
    Client c2 = (Client) p;
    c2.sendMessage("-"+c.playerName+"- just opened a Quest Kit [Elite]!");
    }
    }
    may be missing imports but figure htat out urself
    [Only registered and activated users can see links. ]


    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2011
    Posts
    36
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by phl0w View Post
    i'm not pissed you're just retarded


    Replace anything below
    Code:
    c.sendMessage("<col=1532693>You open the Quest kit (Elite)</col>");
    with
    Code:
    for (Player p : PlayerHandler.players) {
    if (p != null) {
    Client c2 = (Client) p;
    c2.sendMessage("-"+c.playerName+"- just opened a Quest Kit [Elite]!");
    }
    }
    may be missing imports but figure htat out urself
    src\server\model\players\packets\ClickItem.java:31 8: error: reached end of file
    while parsing
    }
    ^
    1 error
    Tryck ned valfri tangent för att fortsätta...
    Reply With Quote  
     

  6. #6  
    Donator

    Tringan's Avatar
    Join Date
    Feb 2011
    Age
    24
    Posts
    2,104
    Thanks given
    381
    Thanks received
    334
    Rep Power
    297
    import server.Server;

    also u need to add a bracket somewhere
    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. Java Programmers Click Here!
    By blessthefall in forum Application Development
    Replies: 42
    Last Post: 12-08-2011, 12:36 AM
  2. Replies: 3
    Last Post: 08-14-2011, 12:22 PM
  3. ClickItem.java help [Emulous]
    By Rock Me Plox in forum Help
    Replies: 1
    Last Post: 04-01-2009, 08:03 AM
  4. silab items for item.java and item.cfg
    By Frosty Teh Snowman in forum Configuration
    Replies: 81
    Last Post: 08-04-2008, 04:38 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
  •