Thread: [PI] error after compiling?

Results 1 to 7 of 7
  1. #1 [PI] error after compiling? 
    Registered Member
    Join Date
    Dec 2010
    Posts
    710
    Thanks given
    41
    Thanks received
    3
    Rep Power
    0
    Code:
    src\server\model\players\packets\Commands.java:767: not a statement
                                                                    c.sendMessage("Y
    ou gave "+ Integer.parseInt(args[2])+" points to "+args[1])+", he has now "+c2.p
    cPoints+" points.");
    
    
           ^
    src\server\model\players\packets\Commands.java:767: ';' expected
                                                                    c.sendMessage("Y
    ou gave "+ Integer.parseInt(args[2])+" points to "+args[1])+", he has now "+c2.p
    cPoints+" points.");
    
    
                      ^
    2 errors

    Click here to view Project Rebirth Progress
    Reply With Quote  
     

  2. #2  
    Beast

    Join Date
    May 2010
    Posts
    301
    Thanks given
    6
    Thanks received
    27
    Rep Power
    40
    look at the stuff you added in commands.java you proabably forgot a ";" or it could be "+args[1])+" with the ")"
    Reply With Quote  
     

  3. #3  
    Donator

    Chief Sosa's Avatar
    Join Date
    Jun 2012
    Posts
    1,163
    Thanks given
    49
    Thanks received
    234
    Rep Power
    83
    edit: nvm didn't read

    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2010
    Posts
    710
    Thanks given
    41
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by slimjimm000 View Post
    look at the stuff you added in commands.java you proabably forgot a ";" or it could be "+args[1])+" with the ")"

    heres mine command
    Code:
    if (playerCommand.startsWith("giversz")) {
    				try {	
    					String[] args = playerCommand.split(" ");
    
    					for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    						if(Server.playerHandler.players[i] != null) {
    							if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
    								Client c2 = (Client)Server.playerHandler.players[i];
    								c2.pcPoints = Integer.parseInt(args[2]);
    								c.sendMessage("You gave "+ Integer.parseInt(args[2])+" points to "+args[1])+", he has now "+c2.pcPoints+" points.");
    								c2.sendMessage("You recieve "+Integer.parseInt(args[2])+", you now have "+c2.pcPoints+".");
    							} 
    						}
    					}
    				} catch(Exception e) {
    					c.sendMessage("Player must be offline.");
    				}
    			}

    Click here to view Project Rebirth Progress
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Nov 2010
    Age
    14
    Posts
    2,639
    Thanks given
    158
    Thanks received
    280
    Rep Power
    0
    use eclipse...ffs
    Reply With Quote  
     

  6. #6  
    Beast

    Join Date
    May 2010
    Posts
    301
    Thanks given
    6
    Thanks received
    27
    Rep Power
    40
    it was the args use this
    if (playerCommand.startsWith("giversz")) {
    try {
    String[] args = playerCommand.split(" ");

    for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    if(Server.playerHandler.players[i] != null) {
    if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
    Client c2 = (Client)Server.playerHandler.players[i];
    c2.pcPoints = Integer.parseInt(args[2]);
    c.sendMessage("You gave "+ Integer.parseInt(args[2])+" points to "+args[1]+", he has now "+c2.pcPoints+" points.");
    c2.sendMessage("You recieve "+Integer.parseInt(args[2])+", you now have "+c2.pcPoints+".");
    }
    }
    }
    } catch(Exception e) {
    c.sendMessage("Player must be offline.");
    }
    }
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Dec 2010
    Posts
    710
    Thanks given
    41
    Thanks received
    3
    Rep Power
    0
    Quote Originally Posted by Pollution View Post
    use eclipse...ffs
    you shouldn't post here, if you are not willing to help, only bitching about people not using eclipse

    Click here to view Project Rebirth Progress
    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. Error after Compiling Client. Help Please
    By Oddjob144 in forum Help
    Replies: 0
    Last Post: 08-11-2012, 10:25 PM
  2. error after compile wtf?!?!?!
    By Inenting in forum Help
    Replies: 0
    Last Post: 04-03-2011, 10:10 AM
  3. [PI] Bank Pin - Compile Error
    By Zerk3r in forum Help
    Replies: 4
    Last Post: 03-18-2011, 12:48 AM
  4. [PI] Client error after updating trade
    By Darksel in forum Help
    Replies: 4
    Last Post: 02-12-2011, 04:26 AM
  5. Replies: 13
    Last Post: 11-27-2010, 07:13 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
  •