Thread: pi vote forcash

Results 1 to 3 of 3
  1. #1 pi vote forcash 
    Banned
    Join Date
    May 2011
    Posts
    205
    Thanks given
    39
    Thanks received
    3
    Rep Power
    0
    i have no idea how to fix this can someone take a crack at it?
    heres the code
    Spoiler for Code:
    Code:
    public boolean checkVotes(String playerName) {
    try {
    String urlString = "http://lunarscapepking.info/vote/vote.php?type=checkvote&username="+playerName;
    urlString = urlString.replaceAll(" ", "%20");
    URL url = new URL(urlString);
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
    String results = reader.readLine();
    if(results.length() > 0) {
    if(results.equals("user needs reward..."))
    return true;
    else 
    return false;
    }
    } catch (MalformedURLException e) {
    System.out.println("Malformed URL Exception in checkVotes(String playerName)");
    } catch (IOException e) {
    System.out.println("IO Exception in checkVotes(String playerName)");
    }
    return false;
    }


    and heres the errors

    Spoiler for errors:
    Code:
    src\server\model\players\Client.java:367: cannot find symbol
    symbol  : class URL
    location: class server.model.players.Client
    URL url = new URL(urlString);
    ^
    src\server\model\players\Client.java:367: cannot find symbol
    symbol  : class URL
    location: class server.model.players.Client
    URL url = new URL(urlString);
                  ^
    src\server\model\players\Client.java:368: cannot find symbol
    symbol  : class BufferedReader
    location: class server.model.players.Client
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(
    )));
    ^
    src\server\model\players\Client.java:368: cannot find symbol
    symbol  : class BufferedReader
    location: class server.model.players.Client
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(
    )));
                                ^
    src\server\model\players\Client.java:368: cannot find symbol
    symbol  : class InputStreamReader
    location: class server.model.players.Client
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(
    )));
                                                   ^
    src\server\model\players\Client.java:376: cannot find symbol
    symbol  : class MalformedURLException
    location: class server.model.players.Client
    } catch (MalformedURLException e) {
             ^
    src\server\model\players\Client.java:378: cannot find symbol
    symbol  : class IOException
    location: class server.model.players.Client
    } catch (IOException e) {
             ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    7 errors
    Press any key to continue . . .


    will rep++ if you can help me fix this and i wil lreally appreciate it thanks
    Reply With Quote  
     

  2. #2  
    Fuck the rest join the best, WoR
    Jinx's Avatar
    Join Date
    Oct 2010
    Posts
    635
    Thanks given
    99
    Thanks received
    65
    Rep Power
    364
    Import the required classes .
    The wor has begun.


    Reply With Quote  
     

  3. #3  
    looking for partnership

    Satan's Avatar
    Join Date
    Oct 2010
    Posts
    833
    Thanks given
    287
    Thanks received
    68
    Rep Power
    269
    ^add the imports form the tutorial..

    [/url]
    Reply With Quote  
     

  4. Thankful user:



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. Replies: 27
    Last Post: 07-27-2023, 10:49 PM
  2. Replies: 7
    Last Post: 04-29-2014, 09:06 PM
  3. Replies: 4
    Last Post: 10-13-2009, 09:39 AM
  4. Replies: 1
    Last Post: 10-13-2009, 03:19 AM
  5. Whats the Best Band VOTE VOTE VOTE!
    By C.T in forum Voting
    Replies: 1
    Last Post: 12-02-2008, 11:30 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •