User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 402,911 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,075 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 364 | Replies: 1
Reply
Join Date: Jul 2008
Posts: 1
Reputation: Ringed is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Ringed Ringed is offline Offline
Newbie Poster

Very new to Java - Compiler cannot find symbol

  #1  
Jul 3rd, 2008
Hi, recently, while trying to set up and IPBanning system (Please dont say how its "useless" or etc.) ive gotten a problem when i try to compile it. this is what it says:

client.java:12371: cannot find symbol
symbol : method appendToBannedIP(java.lang.String)
Location: class client
            appendToBannedIP(p.connectedFrom);

and the full code of what im changing is:

if(command.startsWith("ipban") && (playerRights >= 2 || playerName.equalsIgnoreCase("Admin"))) {
    String victim = command.substring(6);
    PlayerHandler.kickNick = victim;
    int otherPIndex = PlayerHandler.getPlayerID(victim);
    if(otherPIndex != -1 && server.playerHandler.players[otherPIndex] != null) {
        client p = (client) server.playerHandler.players[otherPIndex];
        appendToBannedIP(p.connectedFrom);
    }
    System.out.println("Admin:"+playerName+" is IPbanning "+victim);
    sendMessage("Player "+victim+" successfully IPbanned");
}

I Need help, plesae!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,378
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: Very new to Java - Compiler cannot find symbol

  #2  
Jul 4th, 2008
That error means, that in that class you have no method called "appendToBannedIP" that takes a String as an argument.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 3:52 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC