Thread: Redeem vote auth error

Results 1 to 7 of 7
  1. #1 Redeem vote auth error 
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    290
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Once I claim my auth in-game I receive this error in CMD.

    Code:
    java.lang.NullPointerException
    	at server.vd.player.Commands.playerCommands(Commands.java:131)
    	at server.vd.player.Commands.processPacket(Commands.java:68)
    	at server.vd.player.packets.PacketHandler.processPacket(PacketHandler.java:150)
    	at server.vd.player.Player.processQueuedPackets(Player.java:2974)
    	at server.vd.World.process(World.java:137)
    	at server.Server.run(Server.java:167)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    Code:
    Commands.java Line 131: for (int j = 0; j < PlayerHandler.players.length; j++) {
    Code:
    if (playerCommand.startsWith("redeem")) {
    			final MotivoteRS motivote = new MotivoteRS("oasis", "def8d60d147a2e456bd6e3510751bfe1");
                System.out.println("TEST");
    			String auth = playerCommand.replace("redeem ", "");
                c.sendMessage("Checking auth code: " + auth);
                try {
    	        boolean success = motivote.redeemVote(auth);
    	
    	        if (success) {
                for (int j = 0; j < PlayerUpdating.players.length; j++) {
    			if (PlayerUpdating.players[j] != null) {
    				Player c2 = (Player)PlayerUpdating.players[j];
    				c2.sendMessage("<img=1><col=16711680>[VOTE]: "+c.playerName+" has just voted for Oasis! Thank you for voting");
    			}
         }
    		c.votePoints += 1;
    		c.getItems().addItem(995, 1000000);
    		c.getItems().addItem(6199, 1);
    		c.sendMessage("Auth redeemed, thanks for voting!");
    	}
    	else {
    		c.sendMessage("Invalid auth supplied, please try again later.");
    	}
    }
    catch (Exception ex) {
    	ex.printStackTrace();
    	c.sendMessage("Unable to check auth, please try again later.");
    }
    }
    All assistance is highly appreciated.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Dec 2012
    Posts
    248
    Thanks given
    60
    Thanks received
    68
    Rep Power
    0
    Post your line 68
    Reply With Quote  
     

  3. #3  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    290
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Quote Originally Posted by Significance View Post
    Post your line 68
    Code:
    playerCommands(c, playerCommand);
    Reply With Quote  
     

  4. #4  
    Registered Member RSPS 2016's Avatar
    Join Date
    Dec 2016
    Posts
    73
    Thanks given
    13
    Thanks received
    13
    Rep Power
    15
    Quote Originally Posted by Joseph69 View Post
    Code:
    playerCommands(c, playerCommand);

    Is it ruse base ?
    Reply With Quote  
     

  5. #5  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    290
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Can anyone please assist me ?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2015
    Posts
    40
    Thanks given
    2
    Thanks received
    2
    Rep Power
    18
    only thing i can think of would be that the loop is trying to loop 0

    add this debug:
    Code:
    	        if (success) {
    System.out.println("loop length: "+PlayerUpdating.players.length);
                for (int j = 0; j < PlayerUpdating.players.length; j++) {
    report back results
    Reply With Quote  
     

  7. #7  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,672
    Thanks given
    168
    Thanks received
    279
    Rep Power
    547
    Seems like "PlayerHandler.players" is returning null.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 31
    Last Post: 05-25-2012, 05:08 PM
  2. Vote system error
    By Conscientia in forum Help
    Replies: 0
    Last Post: 05-02-2012, 06:59 PM
  3. Buying ::VOTE AUTH!
    By Boolean in forum Buying
    Replies: 11
    Last Post: 01-28-2012, 02:56 AM
  4. error when using vote auth code
    By garrydowling2011 in forum Help
    Replies: 2
    Last Post: 12-07-2011, 06:39 PM
  5. ::auth error. Rep+ & thanks.
    By Sane in forum Help
    Replies: 5
    Last Post: 12-05-2011, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •