Thread: Not recognising my name?

Results 1 to 8 of 8
  1. #1 Not recognising my name? 
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Code:
    public String Admins[][] = {{"Jonathan"},{"Developer"}};
    	
    	public void updateInterface(Client paramClient) {
    		paramClient.getPA().sendFrame126(
    				"Talking in: <col=FFFF64>" + getTitle() + "</col>", 18139);
    		paramClient.getPA().sendFrame126(
    				"Owner: <col=FFFFFF>" + Misc.formatPlayerName(getFounder())
    				+ "</col>", 18140);
    		Collections.sort(this.activeMembers);
    		for (int i = 0; i < 100; i++) 
    			if (i < this.activeMembers.size()) {
    			for(int kl = 0; kl < Admins.length; kl++) {
    
    		if(this.activeMembers.get(i).equalsIgnoreCase(Admins[kl][0])) {
    
    			paramClient.getPA().sendFrame126( "<clan=8>" +
    						 Misc.formatPlayerName(this.activeMembers.get(i)), 18144 + i);	
    		
    		} else {
    			paramClient.getPA().sendFrame126(
    						"<clan=" + getRank(this.activeMembers.get(i)) + ">" +
    						 Misc.formatPlayerName(this.activeMembers.get(i)), 18144 + i);
    			}
    				
    			}
    			} else
    				paramClient.getPA().sendFrame126("", 18144 + i);
    	}
    Why does it not recognise my name as being in the Admins String?

    Join the Revolution
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2011
    Posts
    454
    Thanks given
    17
    Thanks received
    37
    Rep Power
    61
    Try to debug by printing out "this.activeMembers.get(i)" with c.sendMessage or system.out.println
    Reply With Quote  
     

  3. #3  
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Quote Originally Posted by Gershon View Post
    Try to debug by printing out "this.activeMembers.get(i)" with c.sendMessage or system.out.println
    Doesn't help
    Anybody any ideas?

    Join the Revolution
    Reply With Quote  
     

  4. #4  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    [Java] public String Admins[][] = {{"Jonathan"},{"Developer"}}; public void updat - Pastebin.com

    Cleaned up your code, you were missing braces on the for loop iterating through first 100 users. It's also sorting active members by some method... I have no idea of what the code is trying to do for you. Edit: I don't understand why it's only iterating through the first 100 in the ActiveMembers Collection but perhaps your name is not amongst them?
    Ex-super moderator of Rune-Server.org and RSBot.org
    Reply With Quote  
     

  5. #5  
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Quote Originally Posted by Inside Sin View Post
    [Java] public String Admins[][] = {{"Jonathan"},{"Developer"}}; public void updat - Pastebin.com

    Cleaned up your code, you were missing braces on the for loop iterating through first 100 users. It's also sorting active members by some method... I have no idea of what the code is trying to do for you. Edit: I don't understand why it's only iterating through the first 100 in the ActiveMembers Collection but perhaps your name is not amongst them?
    This now Partially works.
    It recognises 'Developer' however it does not recognise 'Jonathan'
    I switched them around so that it read:

    Code:
    public String Admins[][] = {{"Developer"},{"Jonathan"}};
    It then registered 'Jonathan' but not 'Developer'.
    Why is it only recognising the last entry?

    Join the Revolution
    Reply With Quote  
     

  6. #6  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Okay,

    {"Developer"},{"Jonathan"} is an array, correct?

    Now if we made an array of arrays [][] then it'd be {{"Developer"},{"Jonathan"},{"Developer"},{"Inside Sin"}}

    Where there are two members, i.e. two arrays nested inside the array. To select [k1][0] of any item k1 = to select {"Developer"},{"Jonathan"} and then select "Developer".

    It's not acting upon the second value at all.
    Ex-super moderator of Rune-Server.org and RSBot.org
    Reply With Quote  
     

  7. #7  
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Quote Originally Posted by Inside Sin View Post
    Okay,

    {"Developer"},{"Jonathan"} is an array, correct?

    Now if we made an array of arrays [][] then it'd be {{"Developer"},{"Jonathan"},{"Developer"},{"Inside Sin"}}

    Where there are two members, i.e. two arrays nested inside the array. To select [k1][0] of any item k1 = to select {"Developer"},{"Jonathan"} and then select "Developer".

    It's not acting upon the second value at all.
    I thought that it would check all values in the array rather than just one?
    Edit -
    This is my understanding of the code.

    This array states Player's names:
    Code:
    public String Admins[][] = {{"Jonathan"},{"Developer"}};
    If the player's name is in the array..
    Code:
    if(this.activeMembers.get(i).equalsIgnoreCase(Admins[kl][0])) {
    Then display this:
    Code:
    paramClient.getPA().sendFrame126( "<clan=8>" +
    							Misc.formatPlayerName(this.activeMembers.get(i)), 18144 + i);
    Else display this...
    Code:
    paramClient.getPA().sendFrame126(
    							"<clan=" + getRank(this.activeMembers.get(i)) + ">" +
    							 Misc.formatPlayerName(this.activeMembers.get(i)), 18144 + i);

    Join the Revolution
    Reply With Quote  
     

  8. #8  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    What does that have to do with the second element in the array? "Developer" makes it's appearance no where in this code. It is probably a part of getRank(member).

    You're understanding it right, if your name isn't within the first 100 users of the "activeMembers" collection then it won't check anything.
    Ex-super moderator of Rune-Server.org and RSBot.org
    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: 0
    Last Post: 07-22-2013, 05:38 AM
  2. iTunes not recognising my iPod
    By H0rn in forum Software
    Replies: 6
    Last Post: 08-04-2009, 04:10 AM
  3. change my name to ..:Loading:.. please
    By .:Loading:. in forum Usernames
    Replies: 2
    Last Post: 10-14-2008, 09:59 PM
  4. ****ing say my name right you morons...
    By Oblakastouf in forum Videos
    Replies: 7
    Last Post: 06-13-2008, 09:25 AM
  5. What shall my name be
    By Stuie in forum Voting
    Replies: 30
    Last Post: 01-04-2008, 08:12 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
  •