Thread: Duel arena

Results 1 to 4 of 4
  1. #1 Duel arena 
    Donator

    Join Date
    Nov 2012
    Posts
    769
    Thanks given
    45
    Thanks received
    42
    Rep Power
    18
    Sometimes i get this nullpoint when finishing a duel, can anyone help me
    Code:
    [12/06/19 18:10]: java.lang.NullPointerException
    [12/06/19 18:10]: 	at server.model.players.packets.Walking.processPacket(Walking.java:41)
    [12/06/19 18:10]: 	at server.model.players.PacketHandler.processPacket(PacketHandler.java:139)
    [12/06/19 18:10]: 	at server.model.players.Client.processQueuedPackets(Client.java:1282)
    [12/06/19 18:10]: 	at server.model.players.PlayerHandler.process(PlayerHandler.java:185)
    [12/06/19 18:10]: 	at server.Server$1.execute(Server.java:156)
    [12/06/19 18:10]: 	at server.task.Task.execute(Task.java:21)
    [12/06/19 18:10]: 	at server.task.Executor.executeRemainingTasks(Executor.java:100)
    [12/06/19 18:10]: 	at server.task.Executor.access$1(Executor.java:79)
    [12/06/19 18:10]: 	at server.task.Executor$1.run(Executor.java:63)
    [12/06/19 18:10]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    [12/06/19 18:10]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    [12/06/19 18:10]: 	at java.lang.Thread.run(Unknown Source)
    Line 41 walking.java
    Code:
    	if(c.openDuel) {
    			Client o = (Client) Server.playerHandler.players[c.duelingWith];
    			c.openDuel = false;
    			o.openDuel = false;
    			c.getPA().closeAllWindows();
    			o.getPA().closeAllWindows();
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    270
    Rep Power
    497
    Code:
    	if(c.openDuel) {
    			Client o = (Client) Server.playerHandler.players[c.duelingWith];
    if(o != null) {
    o.getPA().closeAllWindows();
    o.openDuel = false;
    } else
    System.out.println("Opponent is null for some reason!");
    			c.openDuel = false;
    			c.getPA().closeAllWindows();
    	}


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

  3. #3  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,404
    Thanks given
    560
    Thanks received
    510
    Rep Power
    5000
    Proper fix would be to see why the opponent is null. Make sure duelingWith points to proper player index and if it doesnt find where it should be set or is being reset

    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,818
    Thanks given
    889
    Thanks received
    1,433
    Rep Power
    2936
    Quote Originally Posted by hacker View Post
    Proper fix would be to see why the opponent is null. Make sure duelingWith points to proper player index and if it doesnt find where it should be set or is being reset
    This.

    Previous reply was retarded
    "Know thy self, know thy enemy. A thousand battles, a thousand victories." - Sun Tzu
    GitHub: [Only registered and activated users can see links. ]
    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. o.O My New Pure In Duel Arena
    By JavaŠ in forum Media
    Replies: 8
    Last Post: 04-07-2007, 10:22 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
  •