Thread: PI Barrows Ahrim

Results 1 to 3 of 3
  1. #1 PI Barrows Ahrim 
    looking for partnership

    Satan's Avatar
    Join Date
    Oct 2010
    Posts
    833
    Thanks given
    287
    Thanks received
    68
    Rep Power
    269
    Whenever i get hit by ahrim

    Only occurs when shrim uses barrage!

    Code:
    [11/7/12 5:38 PM]: java.lang.NullPointerException
    [11/7/12 5:38 PM]:      at server.model.players.Player.appendHitUpdate(Player.ja
    va:1705)
    [11/7/12 5:38 PM]:      at server.model.players.Player.appendPlayerUpdateBlock(P
    layer.java:1797)
    [11/7/12 5:38 PM]:      at server.model.players.PlayerHandler.updatePlayer(Playe
    rHandler.java:285)
    [11/7/12 5:38 PM]:      at server.model.players.Client.update(Client.java:666)
    [11/7/12 5:38 PM]:      at server.model.players.PlayerHandler.process(PlayerHand
    ler.java:187)
    [11/7/12 5:38 PM]:      at server.Server.main(Server.java:209)
    Player.java :1705
    Code:
    protected void appendHitUpdate(Stream str) {
    		// synchronized(this) {
    		str.writeByte(hitDiff.damage); // What the perseon got 'hit' for
    		if (poisonMask == 1) {
    			str.writeByteA(2);
    		} else if (hitDiff.damage > 0) {
    			str.writeByteA(1); // 0: red hitting - 1: blue hitting
    		} else {
    			str.writeByteA(0); // 0: red hitting - 1: blue hitting
    		}
    		if (playerLevel[3] <= 0) {
    			playerLevel[3] = 0;
    			isDead = true;
    		}
    	1705-->	str.writeByte(hitDiff.combatType.getAffinity());
    		str.writeByteC(playerLevel[3]); // Their current hp, for HP bar
    		str.writeByte(getLevelForXP(playerXP[3])); // Their max hp, for HP bar
    		// }
    	}
    Playerhandler
    Code:
    					plr.playerList[i].appendPlayerUpdateBlock(updateBlock);

    [/url]
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Client Developer

    Pb600's Avatar
    Join Date
    Dec 2008
    Posts
    2,153
    Thanks given
    259
    Thanks received
    472
    Rep Power
    925
    hitDiff.combatType.getAffinity() or hitDiff is null, I'm supposing that getAffinity get the attack type? Maybe when you use barrage it don't create an attack type instance? You can try
    Code:
    if(hitDiff != null && hitDiff.combatType.getAffinity() != null){
     str.writeByte(hitDiff.combatType.getAffinity());
    } else {
     str.writeByte(0);
    }
    Obviously it's a cheap fix to remove the error, since you didn't gave much details about the affinity thing I can't help more, but you can do it by checking why getAffinity or hitDiff is returning null, or any other variable being called there.

    Or you can tell what exactly is every of those variables
    Attached image
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    looking for partnership

    Satan's Avatar
    Join Date
    Oct 2010
    Posts
    833
    Thanks given
    287
    Thanks received
    68
    Rep Power
    269
    Quote Originally Posted by Pb600 View Post
    hitDiff.combatType.getAffinity() or hitDiff is null, I'm supposing that getAffinity get the attack type? Maybe when you use barrage it don't create an attack type instance? You can try
    Code:
    if(hitDiff != null && hitDiff.combatType.getAffinity() != null){
     str.writeByte(hitDiff.combatType.getAffinity());
    } else {
     str.writeByte(0);
    }
    Obviously it's a cheap fix to remove the error, since you didn't gave much details about the affinity thing I can't help more, but you can do it by checking why getAffinity or hitDiff is returning null, or any other variable being called there.

    Or you can tell what exactly is every of those variables

    Thank you PB!

    [/url]
    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. [Model help] Ahrim's robeskirt [ Help please]
    By Its Just Me in forum Models
    Replies: 11
    Last Post: 12-01-2012, 09:08 PM
  2. Replies: 1
    Last Post: 11-20-2011, 02:20 AM
  3. Ahrim's robeskirt
    By Magic in forum Requests
    Replies: 2
    Last Post: 09-27-2011, 08:15 PM
  4. Ahrim help!
    By pkd you5 in forum Help
    Replies: 0
    Last Post: 06-26-2009, 10:15 PM
  5. Ahrim eats a shark?! NO WAI!
    By AAA Mods in forum Show-off
    Replies: 15
    Last Post: 05-10-2009, 11:48 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
  •