Thread: Wierdest error ever

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Wierdest error ever 
    Banned
    Join Date
    Jul 2011
    Posts
    293
    Thanks given
    3
    Thanks received
    1
    Rep Power
    0
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    Can you post the line of code located on line 398 of your Combat Assistant. So that we can see which object is been reference.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2009
    Posts
    4,003
    Thanks given
    1,003
    Thanks received
    1,029
    Rep Power
    0
    I think it's to do with Soul Split not being in the right place , I could be wrong though.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jul 2011
    Posts
    293
    Thanks given
    3
    Thanks received
    1
    Rep Power
    0
    Server.getTaskScheduler().schedule(
    new Task(1, true) {
    @Override
    protected void execute() {
    This is the line- NPCHandler.npcs[c.oldNpcIndex]
    .gfx0(2264); // 1738
    c.SSPLIT = false;
    stop();
    There
    Reply With Quote  
     

  5. #5  
    q.q


    Join Date
    Dec 2010
    Posts
    6,535
    Thanks given
    1,072
    Thanks received
    3,534
    Rep Power
    4752
    Quote Originally Posted by Sir Dave View Post
    I think it's to do with Soul Split not being in the right place , I could be wrong though.
    Too clever.


    OT: was bought to help but noticed you are leech neeb/ 24 bump rule breaker
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    change
    Code:
    This is the line- NPCHandler.npcs[c.oldNpcIndex]
    .gfx0(2264); // 1738
    c.SSPLIT = false;
    stop();
    to
    Code:
    NPC npc = NPCHandler.npcs[c.oldNpcIndex];
    
    if(npc != null) {
          npc.gfx0(2264); // 1738
          c.SSPLIT = false;
    }
    stop();
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Jul 2011
    Posts
    293
    Thanks given
    3
    Thanks received
    1
    Rep Power
    0
    I've done it right now I'll tell you if it worked
    Also in CMD Prompt I get the error about Walking Syntax something,
    And Dropped packets any idea guys?
    Tysm Bluur as-well
    Reply With Quote  
     

  8. #8  
    Registered Member
    Whired's Avatar
    Join Date
    Aug 2007
    Posts
    2,126
    Thanks given
    238
    Thanks received
    500
    Rep Power
    822
    Quote Originally Posted by bluurr View Post
    Code:
    NPC npc = NPCHandler.npcs[c.oldNpcIndex];
    
    if(npc != null) {
          npc.gfx0(2264); // 1738
          c.SSPLIT = false;
    }
    stop();
    Watch out for that ArrayIndexOutOfBoundsException
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    Registered Member
    Whired's Avatar
    Join Date
    Aug 2007
    Posts
    2,126
    Thanks given
    238
    Thanks received
    500
    Rep Power
    822
    Yes Train, most likely.

    This should be better:
    Code:
    NPC npc = null;
    try {
    	npc = NPCHandler.npcs[c.oldNpcIndex];
    }
    catch(ArrayIndexOutOfBoundsException e) {
    	// No action necessary
    }
    
    if(npc != null) {
          npc.gfx0(2264); // 1738
          c.SSPLIT = false;
    }
    stop();
    Although I really don't support this design because if there is a problem with the code, the exception will be swallowed and that will make debugging harder. The problem is that servers set this "oldNpcIndex" to some whacky number when the id isn't supposed to be there, etc.

    Why oh why do we not just have an NPC enemyNpc..then we could set it to null and access it directly..but that's too easy -- we'll use a damn index then look up the npc in an array every time we need to use it
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    Quote Originally Posted by Whired View Post
    Watch out for that ArrayIndexOutOfBoundsException
    Well as long as when the oldNpcIndex is set it is off a valid size for the array and the array is never resized then you shouldn't need to check every time it used.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. wtf wierdest thing eva
    By lilfuzzy420 in forum Media
    Replies: 6
    Last Post: 01-10-2011, 04:36 AM
  2. Wierdest Glitch
    By Yaoi x Yuri in forum Help
    Replies: 1
    Last Post: 09-01-2010, 07:54 AM
  3. Wierdest error ive seen
    By Streax in forum Help
    Replies: 5
    Last Post: 07-08-2010, 09:57 PM
  4. Wierdest Java Error
    By owner jacob in forum Help
    Replies: 7
    Last Post: 01-25-2010, 03:55 PM
  5. Wierdest error in the world!!!
    By Mr NYC in forum Help
    Replies: 2
    Last Post: 02-09-2009, 10:55 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
  •