Thread: Annoying error

Results 1 to 8 of 8
  1. #1 Annoying error 
    Registered Member
    Anfernio's Avatar
    Join Date
    Jul 2008
    Age
    22
    Posts
    414
    Thanks given
    23
    Thanks received
    39
    Rep Power
    221
    Code:
    src\server\model\players\Client.java:278: non-static method handleClanChat(serve
    r.model.players.Client,java.lang.String) cannot be referenced from a static cont
    ext
                            ClanChatHandler.handleClanChat(c, c.lastClan);
                                           ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Press any key to continue . . .


    Methods:

    in class Client:
    Code:
    ClanChatHandler.handleClanChat(c, c.lastClan);

    in class ClanChatHandler:
    Code:
    	public void handleClanChat(Client c, String name) {
    		if (c.clanId != -1) {
    			c.sendMessage("You are already in a clan!");
    			return;
    		}
    		for (int j = 0; j < clans.length; j++) {
    			if (clans[j] != null) {
    				if (clans[j].name.equalsIgnoreCase(name)) {
    					if(checkPass(c, j)){
    						addToClan(c.playerId, j);
    						return;
    					} else {
    						c.sendMessage("Incorrect password!");
    						return;
    					}
    				}
    			}
    		}
    		makeClan(c, name);
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Code:
    public void handleClanChat(Client c, String name) {
    to
    Code:
    public static void handleClanChat(Client c, String name) {


    Reply With Quote  
     

  3. #3  
    Registered Member
    Anfernio's Avatar
    Join Date
    Jul 2008
    Age
    22
    Posts
    414
    Thanks given
    23
    Thanks received
    39
    Rep Power
    221
    Quote Originally Posted by Pakku View Post
    Code:
    public void handleClanChat(Client c, String name) {
    to
    Code:
    public static void handleClanChat(Client c, String name) {
    Already tried, throws off everything else in class ClanChatHandler
    Reply With Quote  
     

  4. #4  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by Anfernio View Post
    Already tried, throws off everything else in class ClanChatHandler
    Then make those static as well.


    Reply With Quote  
     

  5. #5  
    Registered Member
    Anfernio's Avatar
    Join Date
    Jul 2008
    Age
    22
    Posts
    414
    Thanks given
    23
    Thanks received
    39
    Rep Power
    221
    Quote Originally Posted by Pakku View Post
    Then make those static as well.
    Just did it and compiled, nearly finished with my clanjoining on login. Just gotta make it update then I'll probably release ;l
    Reply With Quote  
     

  6. #6  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by Anfernio View Post
    Just did it and compiled, nearly finished with my clanjoining on login. Just gotta make it update then I'll probably release ;l
    Good luck. If you need help, PM me.


    Reply With Quote  
     

  7. #7  
    Registered Member
    Anfernio's Avatar
    Join Date
    Jul 2008
    Age
    22
    Posts
    414
    Thanks given
    23
    Thanks received
    39
    Rep Power
    221
    Quote Originally Posted by Pakku View Post
    Good luck. If you need help, PM me.
    Only problem at is the fact it says you joined but doesn't actually lol
    Reply With Quote  
     

  8. #8  
    Registered Member Pakku's Avatar
    Join Date
    Mar 2010
    Posts
    1,234
    Thanks given
    127
    Thanks received
    111
    Rep Power
    47
    Quote Originally Posted by Anfernio View Post
    Only problem at is the fact it says you joined but doesn't actually lol
    What do you mean? After you enter the clan name, the clan interface doesn't change?


    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. One Little Error, it is annoying me :/
    By TanzanitePS in forum Help
    Replies: 2
    Last Post: 07-30-2011, 03:30 AM
  2. [PI] 1 annoying error, please help.
    By Tando in forum Help
    Replies: 2
    Last Post: 06-24-2011, 04:58 AM
  3. really small error annoying me
    By karl ownz u in forum Help
    Replies: 11
    Last Post: 05-01-2010, 09:59 AM
  4. very annoying error
    By Leanbow in forum Help
    Replies: 15
    Last Post: 11-10-2009, 08:23 AM
  5. Annoying Error [508 - Death]
    By 00o0o0oo0 in forum Help
    Replies: 7
    Last Post: 05-31-2009, 11:13 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
  •