Thread: Private/Public Void Non-accesible

Results 1 to 3 of 3
  1. #1 Private/Public Void Non-accesible 
    Registered Member
    Join Date
    Jun 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    1
    Code:
    Now starting build of Solaris Source Code.
    src\com\rs2\worldserver\server.java:27: PlayerHandler() is not public in com.rs2
    .worldserver.player.PlayerHandler; cannot be accessed from outside package
                    playerHandler = new PlayerHandler();
                                    ^
    1 error
    Building of Solaris Source Code complete.
    Press any key to continue . . .
    I know the fix, but I don't get what to do for this.
    Code:
    	public static String playersCurrentlyOn[] = new String[maxPlayers];
    
    	PlayerHandler()
    	{
    		for(int i = 0; i < maxPlayers; i++) {
    			players[i] = null;
    		}
    	}
    It seems to be public?
     

  2. #2  
    Renown Programmer

    Method's Avatar
    Join Date
    Feb 2009
    Posts
    1,399
    Thanks
    0
    Thanked 784 Times in 316 Posts
    Rep Power
    2224
    Add the keyword public before the PlayerHandler constructor.
     

  3. #3  


    Elysian Elysian Elysian

    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    19
    Posts
    13,266
    Thanks
    4,768
    Thanked 7,417 Times in 3,322 Posts
    Rep Power
    5000
    it needs to be public PlayerHandler() {
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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