3
\$\begingroup\$

So If you set it to like

abcdefg

it will come out like

bcdefg

Here's changing the message

enter image description here

Here's the result

enter image description here

Here's the code

//Set Welcome msg
else if (Type == 6)
{
    if (Character.Network.Stall.isOpened) return;
    short length = Reader.Int16();
    Character.Network.Stall.WelcomeMsg = Reader.Text3();
    Character.Network.Stall.Send(Packet.StallWelcome(Character.Network.Stall.WelcomeMsg));
}

Any help?

\$\endgroup\$

migrated from stackoverflow.com Aug 17 '11 at 23:34

This question came from our site for professional and enthusiast programmers.

  • \$\begingroup\$ Your question lacks a lot of context. What is the Character class? What is "Game Setting"? \$\endgroup\$ – Albin Sunnanbo Aug 17 '11 at 18:55
  • \$\begingroup\$ The images load fine for me. You may need to post additional code in order for the truncation to be diagnosed properly. \$\endgroup\$ – WEFX Aug 17 '11 at 18:56
  • \$\begingroup\$ Oh hey look it's Silkroad Online. It's cool to see this kind of thing on StackOverflow! \$\endgroup\$ – k.schroeder31 Aug 17 '11 at 19:40
9
\$\begingroup\$

char is 16 bits, are you sure you aren't reading the first char when you try to read the length?

Try reading the whole block as text:

else if (Type == 6)
{
    if (Character.Network.Stall.isOpened) return;
    Character.Network.Stall.WelcomeMsg = Reader.Text3();
    Character.Network.Stall.Send(Packet.StallWelcome(Character.Network.Stall.WelcomeMsg));
}
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy