Thread: Voting

Results 1 to 3 of 3
  1. #1 Voting 
    Registered Member
    Join Date
    Dec 2011
    Posts
    706
    Thanks given
    9
    Thanks received
    3
    Rep Power
    30
    I'm trying to add Motivote to Vencillio.
    I added the following command, but it's saying "redeemVote" is undefined for the type Motivote. How can I fix this?

    Code:
    		case "redeem":
    			   String auth = parser.nextString().replaceAll("redeem ", "");
    			    try {
    			     boolean success = motivote.redeemVote(auth);
    			     if (success) {
    			      VencillioConstants.LAST_VOTER = player.getUsername();
    			      VencillioConstants.CURRENT_VOTES++;
    			                                  player.setVotePoints(player.getVotePoints() + 1);
    			      World.sendGlobalMessage("<img=9> @red@" + Utility.formatPlayerName(player.getUsername()) + " has just claimed an auth code");
    			      player.send(new SendMessage("Thank you for voting, " + Utility.formatPlayerName(player.getUsername()) + "!"));
    			     }
    			     else {
    			      player.send(new SendMessage("Invalid auth!"));
    			     }
    			    }
    			    catch (Exception ex) {
    			     ex.printStackTrace();
    			    }
    			   return true;
    Reply With Quote  
     

  2. #2  
    ???

    funkE's Avatar
    Join Date
    Feb 2008
    Posts
    2,612
    Thanks given
    255
    Thanks received
    989
    Rep Power
    1366
    Quote Originally Posted by awesomenoob View Post
    I'm trying to add Motivote to Vencillio.
    I added the following command, but it's saying "redeemVote" is undefined for the type Motivote. How can I fix this?

    Code:
    		case "redeem":
    			   String auth = parser.nextString().replaceAll("redeem ", "");
    			    try {
    			     boolean success = motivote.redeemVote(auth);
    			     if (success) {
    			      VencillioConstants.LAST_VOTER = player.getUsername();
    			      VencillioConstants.CURRENT_VOTES++;
    			                                  player.setVotePoints(player.getVotePoints() + 1);
    			      World.sendGlobalMessage("<img=9> @red@" + Utility.formatPlayerName(player.getUsername()) + " has just claimed an auth code");
    			      player.send(new SendMessage("Thank you for voting, " + Utility.formatPlayerName(player.getUsername()) + "!"));
    			     }
    			     else {
    			      player.send(new SendMessage("Invalid auth!"));
    			     }
    			    }
    			    catch (Exception ex) {
    			     ex.printStackTrace();
    			    }
    			   return true;
    The tutorial on the forum is out of date, I will fix that asap. The up to date tutorial is on the same site as the download.
    .
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2011
    Posts
    706
    Thanks given
    9
    Thanks received
    3
    Rep Power
    30
    Does anyone know the type that will let "redeem" work?
    Player.???

    Code:
    		case "redeemuser":
    			Result r2 = Motivote.redeem(SearchField.USER_NAME, player.);
    			if (r2.success()) {
    				// since this type of redemption can yield multiple votes being redeemed at once
    				// check how many were redeemed.
    				int total = r2.votes().size();
    				System.out.println("Successful redemption! x" + total);
    			}
    			return true;
    Anyone know the voting command for Vencillio?
    Reply With Quote  
     


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. Paint VS Photoshop, Vote Please!!!
    By Karlis in forum General
    Replies: 22
    Last Post: 11-04-2007, 07:40 PM
  2. Sotw 1 Voting
    By Stuie in forum General
    Replies: 28
    Last Post: 06-14-2007, 12:19 AM
  3. Vote your favorite....
    By Aces in forum Showcase
    Replies: 0
    Last Post: 04-02-2007, 03:00 AM
  4. Replies: 0
    Last Post: 12-26-2006, 06:36 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
  •