l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com

Author Topic: [HELP]Vote Reward Problem  (Read 3069 times)

0 Members and 1 Guest are viewing this topic.

Offlinedisorder25

  • Newbie
  • *
  • Posts: 47
  • L2topzone Votes: 23
  • Servers reviews: 0
  • Reputation: +114/-0
    • L2 Obsessed PVP Server
[HELP]Vote Reward Problem
« on: March 18, 2014, 08:46:54 AM »
Can you help me fix this script?

Code: [Select]
public int getVotes()
{
URL url = null;
InputStreamReader isr = null;
BufferedReader in = null;
try
{
url = new URL(http);
URLConnection con = url.openConnection();
con.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2");
isr = new InputStreamReader(url.openStream());
in = new BufferedReader(isr);
String inputLine;
while ((inputLine = in.readLine()) != null)
{
// for top-zone
if (inputLine.contains("Votes:"))
{
return Integer.valueOf(inputLine.split(">")[3].replace("</div", ""));
}
}


Linkback: https://l2topzone.com/forum/index.php?topic=18042.0

l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com
l2topzone.com

OfflineiVersion

  • Jr. Member
  • **
  • Posts: 52
  • L2topzone Votes: 24
  • Servers reviews: 0
  • Reputation: +0/-0
  • L2J Interlude Dev

    OfflineGraetMaestro

    • Hero Member
    • *****
    • Posts: 530
    • L2topzone Votes: 1
    • Servers reviews: 0
    • Reputation: +57/-0
      Re: [HELP]Vote Reward Problem
      « Reply #2 on: March 18, 2014, 11:58:15 AM »
      hello
      or try check  this this last post from  administrator  xzone ...http://l2topzone.com/forum/announcements-and-news/fix-for-voterewards/

       

      Sitemap