This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
Medisept
Hello there once again. I am trying to install this vote reward to my server : http://www.maxcheaters.com/topic/104990-freya-hoptop-zone-vote-reward/
It seems to have one problem on getVotes() method.
Im speaking for this one :
private int getVotes() + { + URL url = null; + InputStreamReader isr = null; + BufferedReader in = null; + try + { + url = new URL(http); + isr = new InputStreamReader(url.openStream()); + in = new BufferedReader(isr); + String inputLine; + while ((inputLine = in.readLine()) != null) + { + // for top-zone + if (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\"")) + { + return Integer.valueOf(inputLine.split(">")[5].replace("</font", "")); + } + } + } + catch (IOException e) + { + _log.warning("AutoVoteRewardHandler: "+e); + } + finally + { + try + { + in.close(); + } + catch (IOException e) + {} + try + { + isr.close(); + } + catch (IOException e) + {} + } + return 0; + }How should i make it to work for TOPZONE? I mean, this is the wrong part according to logic...
Edited by Mediseptif (inputLine.contains("<tr><td><div align=\"center\"><b><font style=\"font-size:14px;color:#018BC1;\""))
{
return Integer.valueOf(inputLine.split(">")[5].replace("</font", ""));
}
Thanks in advance.
1 answer 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