Thread: Help adding dueling

Results 1 to 6 of 6
  1. #1 Help adding dueling 
    thenewchance
    Guest
    Hey, I'm a pretty experienced coder, but when adding dueling I have an error when compiling.

    Code:
    client.java:20185: illegal start of type
                    if(!isInWilderness() || !inDuelGame()) {
                    ^
    client.java:20185: illegal start of type
                    if(!isInWilderness() || !inDuelGame()) {
                       ^
    client.java:20185: ')' expected
                    if(!isInWilderness() || !inDuelGame()) {
                        ^
    client.java:20185: ';' expected
                    if(!isInWilderness() || !inDuelGame()) {
                                      ^
    client.java:20185: illegal start of type
                    if(!isInWilderness() || !inDuelGame()) {
                                       ^
    client.java:20185: <identifier> expected
                    if(!isInWilderness() || !inDuelGame()) {
                                        ^
    client.java:20185: ';' expected
                    if(!isInWilderness() || !inDuelGame()) {
                                           ^
    client.java:20185: invalid method declaration; return type required
                    if(!isInWilderness() || !inDuelGame()) {
                                             ^
    client.java:20185: ';' expected
                    if(!isInWilderness() || !inDuelGame()) {
                                                         ^
    9 errors
    Finished!
    Press any key to continue . . .
    I'm trying to add a "Challenge" right click for players.

    Code:
    		if(!isInWilderness() || !inDuelGame()) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(2);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("Challenge");
    			outStream.endFrameVarSize();
    }
    Put in the right place, right next to the "Attack" right click in client.java.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Range 2h's Avatar
    Join Date
    Jun 2007
    Posts
    437
    Thanks given
    1
    Thanks received
    14
    Rep Power
    254
    Code:
    if(!isInWilderness(); || !inDuelGame();) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(2);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("Challenge");
    			outStream.endFrameVarSize();
    }
    Try that? Idk. Just a random guess. Most likely not going to work.
    Reply With Quote  
     

  3. #3  
    Member Help adding dueling Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Quote Originally Posted by Range 2h View Post
    Code:
    if(!isInWilderness(); || !inDuelGame();) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(2);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("Challenge");
    			outStream.endFrameVarSize();
    }
    Try that? Idk. Just a random guess. Most likely not going to work.
    That won't work, and make sure you haven't put it in a method by accident..

    Attached imageAttached image
    Reply With Quote  
     

  4. #4  
    Respected Member


    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,099
    Thanks given
    2,226
    Thanks received
    3,146
    Rep Power
    5000
    hint

    Code:
    client.java:20185: illegal start of type
    Attached image

    Spoiler for Spoilers!:
    Attached image
    Attached image
    Attached image
    Attached image
    Reply With Quote  
     

  5. #5  
    Registered Member
    Range 2h's Avatar
    Join Date
    Jun 2007
    Posts
    437
    Thanks given
    1
    Thanks received
    14
    Rep Power
    254
    Quote Originally Posted by Luke132 View Post
    That won't work, and make sure you haven't put it in a method by accident..
    I don't even know what I did.
    Reply With Quote  
     

  6. #6  
    thenewchance
    Guest
    Code:
    	// sends a game message of trade/duelrequests: "PlayerName:tradereq:" or
    	// "PlayerName:duelreq:"
    	public void sM(String s) {
    		outStream.createFrameVarSize(253);
    		outStream.writeString(s);
    		outStream.endFrameVarSize();
    	}
    	public void rightClickCheck() {
    		if(isInWilderness == false || !isInPitGame()) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(3);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("null");
    			outStream.endFrameVarSize();
    		}
    		if(isInWilderness(absX, absY, 1) || isInPitGame() || inCastleWars() || inDuelGame()) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(3);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("Attack");
    			outStream.endFrameVarSize();
    		}
    	}
    		if(!isInWilderness() || !inDuelGame()) {
    			outStream.createFrameVarSize(104);
    			outStream.writeByteC(1);		// command slot
    			outStream.writeByteA(0);		// 0 or 1; 1 if command should be placed on top in context menu
    			outStream.writeString("Challenge");
    			outStream.endFrameVarSize();
    }
    Is this right? I mean, isn't it supposed to be in the method rightClickCheck?
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •