Thread: ArrayIndexOutOfBoundsException

Results 1 to 5 of 5
  1. #1 ArrayIndexOutOfBoundsException 
    Banned

    Join Date
    Apr 2013
    Posts
    1,463
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Hello so i was trying to load mu mod icons form the sprite cachetool so i added this

    Code:
    		for(int i = 62; i <= 71; i++){			modIcons[i] = cacheSprite[i];
    		}

    But when i run the client i get this error

    Code:
    java.lang.ArrayIndexOutOfBoundsException: 62	at client.loadExtraSprites(client.java:13101)
    	at client.startUp(client.java:9939)
    	at RSApplet.run(RSApplet.java:120)
    	at client.run(client.java:6783)
    	at java.lang.Thread.run(Unknown Source)

    This is what it looks like inside the sprite packing

    Reply With Quote  
     

  2. #2  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,322
    Thanks given
    546
    Thanks received
    1,129
    Discord
    View profile
    Rep Power
    1806
    extend the array?
    Code:
    modIcons
    ^though would also modify ur code.. dont think u want it to be lots of unused spots, and then start from 62.
    ...
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Apr 2013
    Posts
    1,463
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by mige5 View Post
    extend the array?
    Code:
    modIcons
    ^though would also modify ur code.. dont think u want it to be lots of unused spots, and then start from 62.
    Why would i need to extend it there is only 10 sprites it worked ok before
    Reply With Quote  
     

  4. #4  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,322
    Thanks given
    546
    Thanks received
    1,129
    Discord
    View profile
    Rep Power
    1806
    Quote Originally Posted by Christian_ View Post
    Why would i need to extend it there is only 10 sprites it worked ok before
    is it that hard to look what is the size of the array? - as ur current code reguires it to be 72.
    ...
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2012
    Posts
    35
    Thanks given
    2
    Thanks received
    3
    Rep Power
    11
    Code:
    for(int i = 0; i < 10; i++) {       
        modIcons[i] = cacheSprite[62 + i];
    }
    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. ArrayIndexOutOfBoundsException: 2568
    By .Sparrow in forum Help
    Replies: 4
    Last Post: 08-18-2010, 01:59 AM
  2. Replies: 2
    Last Post: 08-04-2010, 05:55 PM
  3. [Delta] ArrayIndexOutOfBoundsException..
    By Re4master8 in forum Help
    Replies: 6
    Last Post: 03-12-2010, 12:04 AM
  4. Replies: 1
    Last Post: 12-09-2009, 03:30 AM
  5. java.lang.ArrayIndexOutOfBoundsException: 0
    By Pilldom in forum Projects
    Replies: 0
    Last Post: 11-27-2008, 04:10 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
  •