I can make you one like this:
Vote4Cash
works perfectly
|
Base: Soul Split (Close to project insanity)
Problem: I used the Vote for cash revision 2, now that i finished it. (USING NON MYSQL SERVER SIDE)
So oddly, after they vote they type a command ingame, and it works for anyone but usernames with a space, i have looked into it, tested with it, done everything i can.. But i can't fix it..
It displays this sentence:
When a name with no spaces types it in.Thank you for voting for Runexile, you can vote every 24 hours!
It displays this sentence:
When they don't have a space in their name..Sorry, you have already claimed your reward.
Errors(Compiling Errors): None
Other Information/Media(Pictures, etc):
Here is where i think the problem is:
I had a feeling it was the link, i checked it but found nothing.public static boolean checkVotes(String playerName) {
try {
URL url = new URL("http://rune-xile.net/vote.php?type=checkvote&username="+playerName);
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;
}
I don't fully understand some of the other things it may be, i also think it could be my command:
if (playerCommand.equalsIgnoreCase("myreward"))
{
if(c.checkVotes(c.playerName)) {
c.Votepoints += 1;
c.sendMessage("Thank you for voting for Runexile, you can vote every 24 hours!");
} else
c.sendMessage("Sorry, you have already claimed your reward.");
}
Problem with that one is that you don't actually have to vote to get the reward. You only have to go to the vote page. Talk to "PixelThis" he has a flawless one he sells for $30.
Np anytime
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |