Thread: Array out of bounds, clickitem

Results 1 to 8 of 8
  1. #1 Array out of bounds, clickitem 
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    Fixed it:

    Quote Originally Posted by Sillhouette View Post
    Nevermind, Harlan helped me over MSN

    The client was sending 3 variables but the server wasnt reading one of them. This must have happened when I removed one because it was flagged as unused in eclipse.

    Here is how it was fixed:

    Code:
    public void processPacket(Client c, int packetType, int packetSize) {
    		@SuppressWarnings("unused")
    		int interfaceId = c.getInStream().readSignedWordBigEndianA();
    		int itemSlot = c.getInStream().readUnsignedWordA();
    		int itemId = c.getInStream().readUnsignedWordBigEndian();
    Thanks Harlan.


    I have this exact error:


    Quote Originally Posted by Hood Niqqa View Post
    When i goto clean a herb this is a error I get and I did nothin to it, using jacks blank PI base
    Code:
    [2/21/12 1:46 PM]: java.lang.ArrayIndexOutOfBoundsException: 3724
    [2/21/12 1:46 PM]: 	at server.model.players.packets.ClickItem.processPacket(ClickItem.java:16)
    [2/21/12 1:46 PM]: 	at server.model.players.PacketHandler.processPacket(PacketHandler.java:138)
    [2/21/12 1:46 PM]: 	at server.model.players.Client.processQueuedPackets(Client.java:797)
    [2/21/12 1:46 PM]: 	at server.model.players.PlayerHandler.process(PlayerHandler.java:136)
    [2/21/12 1:46 PM]: 	at server.Server.main(Server.java:175)
    Here are the lines of code:


    Quote Originally Posted by Hood Niqqa View Post
    ClickItem.java
    Code:
    if (itemId != c.playerItems[itemSlot] - 1) {
    			return;
    		}
    processpacket class
    Code:
    	p.processPacket(c, packetType, packetSize);
    			} catch(Exception e) {
    					e.printStackTrace();
    			}
    client class
    Code:
    	PacketHandler.processPacket(this, packetType, packetSize);
    playerhandler class
    Code:
    while(players[i].processQueuedPackets());
    server class
    Code:
    	playerHandler.process();
    Its all the same, just diff lines for me. It happens every time someone clicks an item defined in the class. If you could help me with this id be extremely grateful as I cant eat, drink, do herb, etc atm.

    Thank you
    I'm back
    Reply With Quote  
     

  2. #2  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    you're reading the packet incorrectly
    Reply With Quote  
     

  3. #3  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    Quote Originally Posted by Harlan View Post
    you're reading the packet incorrectly
    Can you help me fix it, I have no idea what went wrong. I did not mess with the packets at all so far as I know. Tell me if you need any files or methods or something.

    Thanks in advanced

    Austin.
    I'm back
    Reply With Quote  
     

  4. #4  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    I saw u post on my profile, I didnt find a fix for it, sorry but its reading the packets incorrectly, all i know.
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     

  5. #5  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    What did you do then?

    My computer's graphic card crapped out last night (almost 9 years old) I gotta get a new computer now (YAY!) anyways it makes it harder to get online unless i can "find" a replacement around school...
    I'm back
    Reply With Quote  
     

  6. #6  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    post your clickitem stream indices
    Reply With Quote  
     

  7. #7  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    I will when I get home.

    Edit: Do you mean these:

    Code:
    public void processPacket(Client c, int packetType, int packetSize) {
    		int itemSlot = c.getInStream().readUnsignedWordA();
    		int itemId = c.getInStream().readUnsignedWordBigEndian();
    I'm back
    Reply With Quote  
     

  8. #8  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    Nevermind, Harlan helped me over MSN

    The client was sending 3 variables but the server wasnt reading one of them. This must have happened when I removed one because it was flagged as unused in eclipse.

    Here is how it was fixed:

    Code:
    public void processPacket(Client c, int packetType, int packetSize) {
    		@SuppressWarnings("unused")
    		int interfaceId = c.getInStream().readSignedWordBigEndianA();
    		int itemSlot = c.getInStream().readUnsignedWordA();
    		int itemId = c.getInStream().readUnsignedWordBigEndian();
    Thanks Harlan.
    I'm back
    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. Array out of bounds...
    By D R O in forum Help
    Replies: 4
    Last Post: 02-22-2012, 10:28 AM
  2. array out of bounds exception
    By Mickt3 in forum Help
    Replies: 5
    Last Post: 08-08-2011, 11:16 AM
  3. [PI] Array out of bounds, help
    By Beanerrr in forum Help
    Replies: 6
    Last Post: 04-24-2011, 11:04 PM
  4. [SHARDS]Array out of bounds
    By Cody. in forum Help
    Replies: 5
    Last Post: 08-22-2009, 07:48 PM
  5. array out of bounds
    By pureiiipker in forum Help
    Replies: 1
    Last Post: 07-03-2009, 06:45 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
  •