Thread: (pi) is this command correct because it not workign at all

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 (pi) is this command correct because it not workign at all 
    Banned
    Join Date
    Oct 2011
    Posts
    416
    Thanks given
    3
    Thanks received
    4
    Rep Power
    0
    help please it shoudl work but it dosent

    public void DonatorCommands(Client c, String playerCommand)
    {

    if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
    c.getPA().startTeleport(2525,4776, 0, "modern");
    } else {
    if(c.InDung()) {
    c.sendMessage("You cannot Teleport here from dung dickhead");
    return;
    }
    if(c.inWild()) {
    c.sendMessage("You cannot do this in wilderness idiot");
    return;
    }
    c.getPA().startTeleport(2525,4776, 0, "modern");
    }

    }
    Reply With Quote  
     

  2. #2  
    Member

    Bells's Avatar
    Join Date
    Dec 2008
    Posts
    3,797
    Thanks given
    599
    Thanks received
    1,449
    Rep Power
    4098
    Code:
    if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
    	c.getPA().movePlayer(2525,4776, 0, "modern");
    	if(!c.inWild && c.InDung()) {
    		return;
    	}
    }
    Try that?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Mar 2011
    Posts
    1,227
    Thanks given
    245
    Thanks received
    475
    Rep Power
    294
    if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
    if(c.InDung()) {
    c.sendMessage("You cannot Teleport here from dung dickhead");
    return;
    }
    if(c.inWild()) {
    c.sendMessage("You cannot do this in wilderness idiot");
    return;
    }
    c.getPA().startTeleport(2525,4776, 0, "modern");
    }

    }
    Btw why would you flame at your players with this:
    c.sendMessage("You cannot Teleport here from dung dickhead");
    c.sendMessage("You cannot do this in wilderness idiot");
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Mar 2011
    Posts
    1,227
    Thanks given
    245
    Thanks received
    475
    Rep Power
    294
    Quote Originally Posted by Bells View Post
    Code:
    if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
    	c.getPA().movePlayer(2525,4776, 0, "modern");
    	if(!c.inWild && c.InDung()) {
    		return;
    	}
    }
    Try that?
    This would tele him even if he was in wild or dungeoneering, it has to be before it..
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Dec 2011
    Posts
    131
    Thanks given
    0
    Thanks received
    1
    Rep Power
    13
    bells ur code is reffering to if character is in dung as well as wild at the same time so it will still let u tell out of both instead it should be
    Code:
    if(!c.inWild || !c.InDung()) {
    Reply With Quote  
     

  6. #6  
    Member

    Bells's Avatar
    Join Date
    Dec 2008
    Posts
    3,797
    Thanks given
    599
    Thanks received
    1,449
    Rep Power
    4098
    Quote Originally Posted by TheLife View Post
    This would tele him even if he was in wild or dungeoneering, it has to be before it..
    Forgot about that.
    Code:
    if (playerCommand.startsWith("donorzone") && c.playerRights >= 4) {
    	if(!c.inWild || !c.InDung()) {
    		c.sendMessage("You cannot teleport to the donator zone at this time");
    		return;
    	}
    	c.getPA().movePlayer(2525,4776, 0, "modern");
    }
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Dec 2011
    Posts
    131
    Thanks given
    0
    Thanks received
    1
    Rep Power
    13
    plz correct me if i am wrong?
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Oct 2011
    Posts
    416
    Thanks given
    3
    Thanks received
    4
    Rep Power
    0
    Error i get anyone else help please thanks anyway

    source\server\model\players\packets\Commands.java: 1990: error: method movePlayer
    in class PlayerAssistant cannot be applied to given types;
    c.getPA().movePlayer(2525,4776, 0, "modern");
    ^
    required: int,int,int
    found: int,int,int,String
    reason: actual and formal argument lists differ in length
    source\server\model\players\packets\Commands.java: 1991: error: cannot find symbo
    l
    if(!c.inWild && c.InDung()) {
    ^
    symbol: variable inWild
    location: variable c of type Client
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    2 errors
    Press any key to continue . . .
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Dec 2011
    Posts
    131
    Thanks given
    0
    Thanks received
    1
    Rep Power
    13
    ffs put a space between the if first of all and double check ur player tokens to see what the wild token is
    Reply With Quote  
     

  10. #10  
    Banned
    Join Date
    Oct 2011
    Posts
    416
    Thanks given
    3
    Thanks received
    4
    Rep Power
    0
    another error

    source\server\model\players\packets\Commands.java: 1990: error: cannot find symbo
    l
    if (!c.inWild || !c.InDung()) {
    ^
    symbol: variable inWild
    location: variable c of type Client
    source\server\model\players\packets\Commands.java: 1994: error: method movePlayer
    in class PlayerAssistant cannot be applied to given types;
    c.getPA().movePlayer(2525,4776, 0, "modern");
    ^
    required: int,int,int
    found: int,int,int,String
    reason: actual and formal argument lists differ in length
    Note: Some input files use unchecked or unsafe operations.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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: 3
    Last Post: 03-03-2012, 11:59 PM
  2. Replies: 25
    Last Post: 05-06-2010, 10:49 AM
  3. Workign on cc :)
    By SODIO in forum Show-off
    Replies: 24
    Last Post: 04-17-2009, 03:57 AM
  4. Castlewars guthix portal workign
    By Raiden1 in forum Tutorials
    Replies: 6
    Last Post: 03-21-2009, 10:28 PM
  5. Correct Right click player (order) "command slots"
    By littleplop in forum Tutorials
    Replies: 13
    Last Post: 02-04-2008, 08:50 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
  •