Thread: [RuneFusion] Getting this compile error... [+rep]

Results 1 to 10 of 10
  1. #1 [RuneFusion] Getting this compile error... [+rep] 
    Banned

    Join Date
    Jul 2011
    Age
    25
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Making a project to keep me occupied for a few months, and I was naming the classes and I got this unexplained error, As far as I can see, there is nothing wrong with my coding, but the compiler seems to think otherwise

    Well I'm getting this error:

    Code:
    Compiling Server
    Please wait patiently...
    src\net\sand-box\player\packets\ButtonClicking.java:5: package net.sandbox.player.buttons
    does not exist
    import net.sandbox.player.buttons.Button;
                                     ^
    src\net\sand-box\player\packets\ButtonClicking.java:6: package net.sandbox.player.buttons
    does not exist
    import net.sandbox.player.buttons.ButtonHandler;
                                     ^
    src\net\sand-box\player\packets\ButtonClicking.java:44: cannot find symbol
    symbol  : class Button
    location: class net.sandbox.player.packets.ButtonClicking
                    Button b = ButtonHandler.getSingleton().get(actionButtonId);
                    ^
    src\net\sand-box\player\packets\ButtonClicking.java:44: cannot find symbol
    symbol  : variable ButtonHandler
    location: class net.sandbox.player.packets.ButtonClicking
                    Button b = ButtonHandler.getSingleton().get(actionButtonId);
                               ^
    4 errors
    Press any key to continue . . .
    When compiling this class
    Code:
    package net.sandbox.player.packets;
    
    import net.sandbox.player.Player;
    import net.sandbox.player.PlayerHandler;
    import net.sandbox.player.buttons.Button;
    import net.sandbox.player.buttons.ButtonHandler;
    import net.sandbox.util.Util;
    
    /**
     **		Sand-Box™ - ButtonClicking.java
     **/
    
    
    
    
    public class ButtonClicking implements PacketHandler {
    
    	private final int INTERFACE_CLICKING = 130,
    				ACTION_BUTTONS = 185,
    				CHARACTER_DESIGN = 101;
    
    	public void handlePacket(Player player, int packetType, int packetSize) {
    		if (packetType == INTERFACE_CLICKING)
    			handleInterfaceClicking(player);
    		else if (packetType == ACTION_BUTTONS)
    			handleActionButtons(player, packetSize);
    		else if (packetType == CHARACTER_DESIGN)
    			handleCharacterDesign(player);
    	}
    
    	private void handleInterfaceClicking(Player player) {
    		///Trade
    		if(player.tradeStatus >= 2) {
    			PlayerHandler.playerTable.get(player.tradeWith).tradeOtherDeclined = true;
    			player.declineTrade();
    			player.sendMessage("You decline the trade.");
    		}
    	}
    
    	private void handleActionButtons(Player player, int packetSize) {
    		int actionButtonId = Util.hexToInt(player.inStream.buffer, 0, packetSize);
    		//if (player.playerRights >= 2)		
    		//player.weaponStyles(actionButtonId);
    		Button b = ButtonHandler.getSingleton().get(actionButtonId);
    		if(b != null) {
    			b.handleButton(player);
    		}
    	}
    
    	private void handleCharacterDesign(Player player) {
    		if(player.isAppearanceSet == 1)
    			player.sendMessage("Your appearance has already been set.");
    		else {
    			int gender = player.inStream.readSignedByte();
    			int head = player.inStream.readSignedByte();
    			int jaw = player.inStream.readSignedByte();
    			int torso = player.inStream.readSignedByte();
    			int arms = player.inStream.readSignedByte();
    			int hands = player.inStream.readSignedByte();
    			int legs = player.inStream.readSignedByte();
    			int feet = player.inStream.readSignedByte();
    			int hairC = player.inStream.readSignedByte();
    			int torsoC = player.inStream.readSignedByte();
    			int legsC = player.inStream.readSignedByte();
    			int feetC = player.inStream.readSignedByte();
    			int skinC = player.inStream.readSignedByte();
    			player.pGender = gender;
    			player.pHead = head;
    			player.pBeard = jaw;
    			player.pTorso = torso;
    			player.pArms = arms;
    			player.pHands = hands;
    			player.pLegs = legs;
    			player.pFeet = feet;
    			player.pHairC = hairC;
    			player.pTorsoC = torsoC;
    			player.pLegsC = legsC;
    			player.pFeetC = feetC;
    			player.pSkinC = skinC;
    			player.appearanceUpdateRequired = true;
    			player.updateRequired = true;
    			player.isAppearanceSet = 1;
    		}
    	}
    
    }
    If you need anymore resources, just ask below...
    I will give rep as always.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2011
    Age
    25
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Bump?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    make sure net.sandbox.player.buttons.Button exists and that it has the proper class structure (package is defined, and there is a class body)

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  4. #4  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,856
    Thanks given
    13,669
    Thanks received
    290
    Discord
    Placeholder#1337
    Rep Power
    5000
    you don't have this existing: net/sandbox/player/packets/
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jul 2011
    Age
    25
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Quote Originally Posted by Aeterna View Post
    make sure net.sandbox.player.buttons.Button exists and that it has the proper class structure (package is defined, and there is a class body)
    I checked over that

    Quote Originally Posted by jordyortega View Post
    you don't have this existing: net/sandbox/player/packets/
    And do I have to add the packet?
    Reply With Quote  
     

  6. #6  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,856
    Thanks given
    13,669
    Thanks received
    290
    Discord
    Placeholder#1337
    Rep Power
    5000
    Quote Originally Posted by Ambient View Post
    I checked over that



    And do I have to add the packet?
    Yes you have to add it, the compiler doesn't recognize the packet because it's not there
    Reply With Quote  
     

  7. #7  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,856
    Thanks given
    13,669
    Thanks received
    290
    Discord
    Placeholder#1337
    Rep Power
    5000
    sorry for 2nd post but, where is sandbox/player/packets located?
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Jul 2011
    Age
    25
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Quote Originally Posted by jordyortega View Post
    sorry for 2nd post but, where is sandbox/player/packets located?
    Sand-Box\src\net\sand-box\player\packets
    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    Sep 2008
    Posts
    2,219
    Thanks given
    148
    Thanks received
    204
    Rep Power
    1570
    use an ide, it'll help you out in the long run

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    Jul 2011
    Age
    25
    Posts
    748
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Still getting the error...
    Here is what I packaged in imported in my button clicking.java
    [Only registered and activated users can see links. ]
    Here is what I have in Sand-Box\src\net\sand-box\player\buttons
    [Only registered and activated users can see links. ]
    Here is what I have in Sand-Box\src\net\sand-box\player\packets
    [Only registered and activated users can see links. ]

    Hope that helped
    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. Compile Error
    By titans321 in forum Help
    Replies: 2
    Last Post: 02-25-2011, 07:25 AM
  2. will rep++ compile error
    By garyhood in forum Help
    Replies: 1
    Last Post: 12-12-2010, 04:10 AM
  3. runefusion error when i syi...
    By luvgirl12345 in forum Help
    Replies: 0
    Last Post: 07-19-2009, 09:05 PM
  4. Compile Error
    By Sir Lethal in forum Help
    Replies: 0
    Last Post: 06-05-2009, 11:39 PM
  5. Need Help with compile error
    By dgoodwin13 in forum Help
    Replies: 20
    Last Post: 02-16-2009, 08:53 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
  •