Thread: Double yell problem?

Results 1 to 7 of 7
  1. #1 Double yell problem? 
    Tantalizing

    Join Date
    May 2014
    Age
    28
    Posts
    14
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Yeah, i coded a certain yell for a player, and now the admin yell aswell at the custom yell comes up, anyone know the fix?

    the kc is for pk ranks.



    Code:
    }	if (c.playerName.equalsIgnoreCase("Lizzy")) {
    									c2.sendMessage("<img=19><col=16777215><shad=16744448>Princess <img=2><col=40703><shad=0>"+ Misc.optimizeText(c.playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    Code:
    }else if (c.playerRights == 2){
    								if (c.KC >= 8501) { //15
    									c2.sendMessage("<img=19><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 7201 && c.KC <= 8500) { //14
    									c2.sendMessage("<img=18><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 6001 && c.KC <= 7200) { //13
    									c2.sendMessage("<img=17><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 4901 && c.KC <= 6000) { //12
    									c2.sendMessage("<img=16><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 4001 && c.KC <= 4900) { //11
    									c2.sendMessage("<img=15><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 3201 && c.KC <= 4000) { //10
    									c2.sendMessage("<img=14><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 2601 && c.KC <= 3200) { //9
    									c2.sendMessage("<img=13><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 2001 && c.KC <= 2600) { //8
    									c2.sendMessage("<img=12><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 1551 && c.KC <= 2000) { //7
    									c2.sendMessage("<img=11><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 1101 && c.KC <= 1550) { //6
    									c2.sendMessage("<img=10><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 751 && c.KC <= 1100) { //5
    									c2.sendMessage("<img=9><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 401 && c.KC <= 750) { //4
    									c2.sendMessage("<img=8><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 251 && c.KC <= 400) { //3
    									c2.sendMessage("<img=7><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 101 && c.KC <= 250) { //2
    									c2.sendMessage("<img=6><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 50 && c.KC <= 100) { //1
    									c2.sendMessage("<img=5><col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    								} else if (c.KC >= 0 && c.KC <= 49) {
    									c2.sendMessage("<col=16777215><shad=16744448>Admin</shad> <img=2><shad=16761125>"+ Misc.optimizeText(c.playerName) +"</shad></col>: "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jun 2012
    Posts
    510
    Thanks given
    33
    Thanks received
    50
    Rep Power
    0
    because its reading two things
    KC
    and
    the name LIZZY
    Make the If(nameEqualsIgnoreCase("Lizzy");
    to Else if(nameEqualsIgnoreCase("Lizzy");

    its reading the name twice, just an easy fix

    Another example of this problem(for more understanding)

    If(playerRights ==3){
    c.sendMessage("Rights are set to 3");
    }
    If(playerName("woof"){
    c.sendMessage("NAme is woof");
    }

    it'll say:
    Rights are set to 3
    NAme is woof



    FIX:
    If(playerRights ==3){
    c.sendMessage("Rights are set to 3");
    }
    else If(playerName("woof"){
    c.sendMessage("NAme is woof");
    }

    Else is saying if the first if statement is false test this.
    but if its true it won't read the else.

    Rights are set to 3
    Reply With Quote  
     

  3. #3  
    Tantalizing

    Join Date
    May 2014
    Age
    28
    Posts
    14
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    l0l, thanks so much
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jun 2012
    Posts
    510
    Thanks given
    33
    Thanks received
    50
    Rep Power
    0
    Quote Originally Posted by Bear Cub View Post
    l0l, thanks so much
    Yup no problemo
    updated it a little, you could re-read it for more info.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2014
    Posts
    813
    Thanks given
    69
    Thanks received
    47
    Rep Power
    9
    dat leach.
    Reply With Quote  
     

  6. #6  
    Tantalizing

    Join Date
    May 2014
    Age
    28
    Posts
    14
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    its not a leech, my friend made it for me who happens to be very good in the java, thanks for your two cents though.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jan 2014
    Posts
    813
    Thanks given
    69
    Thanks received
    47
    Rep Power
    9
    lol. sureeeeee
    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. Yell Problem
    By Xynasty in forum Help
    Replies: 5
    Last Post: 03-06-2011, 12:17 AM
  2. Yell Problem [508] [Rep++]
    By iobpkbarrage in forum Help
    Replies: 10
    Last Post: 02-26-2011, 03:00 PM
  3. [562] Yell problem Pls help
    By Tony12 in forum Help
    Replies: 3
    Last Post: 12-30-2010, 12:33 AM
  4. ::yell problem z525
    By lt gangster in forum Help
    Replies: 4
    Last Post: 08-25-2010, 01:50 AM
  5. yell problem z525
    By lt gangster in forum Help
    Replies: 2
    Last Post: 08-09-2010, 07:53 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
  •