Thread: 357 Chat is giving me errors, can't figure out what's causing them.

Results 1 to 2 of 2
  1. #1 357 Chat is giving me errors, can't figure out what's causing them. 
    Donator

    Ecstasy's Avatar
    Join Date
    Sep 2008
    Age
    29
    Posts
    5,031
    Thanks given
    324
    Thanks received
    596
    Rep Power
    843
    I'm trying to finish 357 chat and I'm getting stuck at this error... I have no idea what's causing the packet offset and the block size to be different but I guess that's what it's telling me.

    Anyways, here is my code:

    Serverside:
    Code:
    	public void appendChatUpdate(Rs2PacketBuilder packet) {
    		ChatMessage cm = player.getChatMessage();
    		byte[] bytes = cm.getData();
    		packet.putShortA(((cm.getColor() & 0xFF) << 8) | (cm.getEffects() & 0xFF));
    		packet.putByteC((byte) player.getRights());
    		packet.putByteA(bytes.length);
    		for(int ptr = bytes.length -1; ptr >= 0; ptr--) {
    			packet.put(bytes[ptr]);
    		}
    	}
    Clientside:
    Code:
    if((k & 0x40) != 0)
            {
                int l = buffer.getShortA();
                int j2 = buffer.getUnsignedByteC();
                int j3 = buffer.getUnsignedByteA();
                int l3 = buffer.currentOffset;
                if(class39_sub3_sub2_sub5_sub1.aString1754 != null && class39_sub3_sub2_sub5_sub1.aBoolean1755)
                {
                    long l4 = Class37.stringToLong(class39_sub3_sub2_sub5_sub1.aString1754);
                    boolean flag = false;
                    if(j2 <= 1)
                    {
                        for(int i4 = 0; i4 < anInt1168; i4++)
                        {
                            if(aLongArray879[i4] != l4)
                                continue;
                            flag = true;
                            break;
                        }
    
                    }
                    if(!flag && anInt897 == 0)
                        try
                        {
                            aClass39_Sub3_Sub3_898.currentOffset = 0;
                            buffer.getReverseBytes(aClass39_Sub3_Sub3_898.buffer, j3, 0);
                            aClass39_Sub3_Sub3_898.currentOffset = 0;
                            String s = Class50.method601(aClass39_Sub3_Sub3_898, j3, 0);
                            s = Class44.method556(s, true);
                            class39_sub3_sub2_sub5_sub1.aString1605 = s;
                            class39_sub3_sub2_sub5_sub1.anInt1607 = l >> 8;
                            class39_sub3_sub2_sub5_sub1.anInt1643 = l & 0xff;
                            class39_sub3_sub2_sub5_sub1.anInt1628 = 150;
                            if(j2 == 2 || j2 == 3)
                                sendMessage((byte)-83, s, 1, "@cr2@" + class39_sub3_sub2_sub5_sub1.aString1754);
                            else
                            if(j2 == 1)
                                sendMessage((byte)-83, s, 1, "@cr1@" + class39_sub3_sub2_sub5_sub1.aString1754);
                            else
                                sendMessage((byte)-83, s, 2, class39_sub3_sub2_sub5_sub1.aString1754);
                        }
                        catch(Exception exception)
                        {
                            Signlink.reporterror("cde2");
                        }
                }
                buffer.currentOffset = l3 + j3;
            }
    And it's giving me this error:

    Code:
    Error: Error packet size mismatch in getplayer pos:202 psize:9
    Error: T2 - 166,208,166 - 9,3200,3200 - 0,-49,-2,-128,59,0,-127,-128,64,
    java.lang.RuntimeException: eek
    	at Client.parseUpdatePlayers(Client.java:7426)
    	at Client.parseOpcode(Client.java:1476)
    	at Client.method113(Client.java:8598)
    	at Client.method7(Client.java:12105)
    	at GameApplet.run(GameApplet.java:111)
    	at Client.run(Client.java:7689)
    	at java.lang.Thread.run(Unknown Source)
    I don't know if this should be in the client section or the server section, but I'm putting it here because I'm almost positive it's the server that's causing it.

    Reply With Quote  
     

  2. #2  
    Donator

    Ecstasy's Avatar
    Join Date
    Sep 2008
    Age
    29
    Posts
    5,031
    Thanks given
    324
    Thanks received
    596
    Rep Power
    843
    nvm close this, fixed.

    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. Replies: 10
    Last Post: 06-09-2011, 01:49 PM
  2. Replies: 2
    Last Post: 01-28-2011, 08:10 AM
  3. Replies: 1
    Last Post: 07-30-2009, 03:48 AM
  4. Can't figure out these errors, tried alot
    By Owner trint in forum Help
    Replies: 10
    Last Post: 01-05-2009, 09:25 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
  •