Thread: [pi]compile code i just cannot fix..[pi]

Results 1 to 5 of 5
  1. #1 [pi]compile code i just cannot fix..[pi] 
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    heres the code im working with..

    Code:
    				}
    			if (playerCommand.startsWith("alltome") && c.playerRights >= 3)) {
    				String name = playerCommand.substring(10);
    				for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    					if (Server.playerHandler.players[i] != null) {
    						Client other = (Client) Server.playerHandler.players[i];
    						other.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel);
    					}
    				}			
    			}
    and heres the error


    Code:
    src\server\model\players\packets\Commands.java:180: illegal start of expression
                                                       if (playerCommand.startsWith("alltome") && c.playerRights >= 3)) {
                                   ^
    1 error
    Press any key to continue . . .

    and the bottom code the arrow is pointing to the 2nd regular bracket at the end.

    any help?

    and if i remove the regular bracket its pointing to, i get three errors:



    any help please?
    sweet
    Reply With Quote  
     

  2. #2  
    Catherby Developer
    Mini Slurpee's Avatar
    Join Date
    Apr 2011
    Posts
    747
    Thanks given
    80
    Thanks received
    86
    Rep Power
    31
    if this doesnt work, pm me ur TV info ill take a look

    Code:
    			if (playerCommand.startsWith("alltome") &&  && c.playerRights >= 3)) {
    				try {
    				for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    					String name = playerCommand.substring(10);
    					if (Server.playerHandler.players[i] != null) {
    						Client other = (Client) Server.playerHandler.players[i];
    						other.getPA().movePlayer(c.getX(), c.getY(), c.heightLevel);
    						} 
    					}
    				} catch(Exception e) {
    					c.sendMessage("No players online");
    				}			
    			}
    Attached image
    “I have not failed, I've just found 10,000 ways that won't work.”
    “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    when i add the code you suggested i get the "reached end of file while parsing" error
    sweet
    Reply With Quote  
     

  4. #4  
    Developer

    Join Date
    Jun 2009
    Posts
    793
    Thanks given
    26
    Thanks received
    67
    Rep Power
    11
    Quote Originally Posted by KENNYLOL View Post
    when i add the code you suggested i get the "reached end of file while parsing" error

    Which means you're missing a bracket.
    Want something done? Private message me, but have something to offer.
    Reply With Quote  
     

  5. #5  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    wht a moron. dont u see that the string is already DEFINED meaning is already there. remove that whole line of code
    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: 7
    Last Post: 04-01-2010, 02:35 AM
  2. Hyperion compile batch code.
    By Ecstasy in forum Help
    Replies: 2
    Last Post: 12-07-2009, 12:31 AM
  3. Compile.bat is wont compile.
    By xXxKBxXx in forum Help
    Replies: 10
    Last Post: 07-27-2008, 09: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
  •