Thread: Teleing in wild Pi

Results 1 to 6 of 6
  1. #1 Teleing in wild Pi 
    Registered Member
    Join Date
    Feb 2012
    Posts
    383
    Thanks given
    72
    Thanks received
    43
    Rep Power
    15
    So I something in where you can't teleport home if your in the wild.
    this is the code:
    Code:
    			case 4171:
    			case 50056:
    			case 117048:
     			if (c.inWild())
          			return;
          			c.getPA().startTeleport(3012, 3364, 0, "modern");
          			break;
    And it works with no errors, but I want it to send a message if you try tele out such as:
    Code:
    			case 4171:
    			case 50056:
    			case 117048:
     			if (c.inWild())
    			c.sendMessage("You cannot use this teleport in wild!");
          			return;
          			c.getPA().startTeleport(3012, 3364, 0, "modern");
          			break;
    But when I add that I get this:
    Code:
    src\server\model\players\packets\ClickingButtons.java:1160: unreachable statemen
    t
                            c.getPA().startTeleport(3012, 3364, 0, "modern");
                            ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Press any key to continue . . .
    Will rep for help.
    I love you and your cat avatars.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2012
    Age
    28
    Posts
    1,217
    Thanks given
    110
    Thanks received
    681
    Rep Power
    0
    else
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Aug 2010
    Age
    27
    Posts
    676
    Thanks given
    80
    Thanks received
    53
    Rep Power
    174
    Code:
    			case 4171:
    			case 50056:
    			case 117048:
     			if (c.inWild()) {
    				c.sendMessage("You cannot use this teleport in wild!");
          				return;
    			} else
          				c.getPA().startTeleport(3012, 3364, 0, "modern");
          			break;
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jul 2012
    Posts
    130
    Thanks given
    76
    Thanks received
    16
    Rep Power
    0
    Code:
    			case 4171:
    			case 50056:
    			case 117048:
     			if (c.inWild())
                            return;
          			c.getPA().startTeleport(3012, 3364, 0, "modern");
          			break;
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Dec 2011
    Age
    26
    Posts
    2,303
    Thanks given
    471
    Thanks received
    764
    Rep Power
    0
    Why would anyone add this.
    Reply With Quote  
     

  6. #6  
    Web, App and game dev
    marciano's Avatar
    Join Date
    Jul 2009
    Posts
    588
    Thanks given
    11
    Thanks received
    28
    Rep Power
    2
    Just keep it simple and explain why it didn't work.

    Code:
    	case 4171:
    	case 50056:
    	case 117048:
     	if (c.inWild()) {
    		c.sendMessage("You cannot use this teleport in wild!");
          	return;
    	} else {
    		c.getPA().startTeleport(3012, 3364, 0, "modern");
    	}
        break;
    If you're using an if-statement, you can also use an else-if. This is usefull for stuff like this. Take a good look at the brackets.
    Fuck the bully's always have self confidence, and have fun in life!

    Spoiler for QOUTES:

    Quote Originally Posted by Faris View Post
    There is no real age limit on learning something new, if you want to do it, then do it.


    Spoiler for VOUCHES:

    Quote Originally Posted by vish View Post
    Vouch, great help and highly professional.
    Quote Originally Posted by Titanium View Post
    Vouch for vbulletin 4.2 postbit backgrounds.
    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: 11-14-2010, 10:52 PM
  2. Replies: 13
    Last Post: 01-29-2010, 03:56 PM
  3. Replies: 4
    Last Post: 07-22-2009, 05:15 AM
  4. Replies: 4
    Last Post: 04-27-2009, 01:54 PM
  5. Making wild sign when entering wild..
    By Pablo in forum Tutorials
    Replies: 8
    Last Post: 11-17-2007, 12:33 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
  •