petr.plasan Posted January 12, 2015 Posted January 12, 2015 Hello guys can me help with this ? I use Individual VoteManger a dont works me .. i Have problem with protected static int getHopZoneVotes() protected static int getHopZoneVotes() { int votes = -1; String Hopzonelink = Config.VOTE_LINK_HOPZONE; InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(Hopzonelink).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("rank anonymous tooltip")) { votes = Integer.valueOf(line.split(">")[2].replace("</span", "")); break; } } br.close(); isr.close(); } catch (Exception e) { System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage()); } return votes; } whats is wrong ? Can me help ? please ?? :)
0 szawex Posted January 18, 2015 Posted January 18, 2015 (edited) J have this same problem. Edited January 18, 2015 by szawex
0 petr.plasan Posted January 26, 2015 Author Posted January 26, 2015 Get the latest one... U have latest ? :) please ?
0 Tessa Posted January 26, 2015 Posted January 26, 2015 U have latest ? :) please ? It's already in l2jfrozen's source...
Question
petr.plasan
Hello guys can me help with this ? I use Individual VoteManger a dont works me .. i Have problem with protected static int getHopZoneVotes()
protected static int getHopZoneVotes() { int votes = -1; String Hopzonelink = Config.VOTE_LINK_HOPZONE; InputStreamReader isr = null; BufferedReader br = null; try { URLConnection con = new URL(Hopzonelink).openConnection(); con.addRequestProperty("User-Agent", "Mozilla/4.76"); isr = new InputStreamReader(con.getInputStream()); br = new BufferedReader(isr); String line; while ((line = br.readLine()) != null) { if (line.contains("rank anonymous tooltip")) { votes = Integer.valueOf(line.split(">")[2].replace("</span", "")); break; } } br.close(); isr.close(); } catch (Exception e) { System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage()); } return votes; }whats is wrong ? Can me help ? please ?? :)
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now