Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

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

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

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

1 Answer 1

up vote 9 down vote accepted

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));
}
share|improve this answer
    
Thanks! Worked! –  user897199 Aug 17 '11 at 19:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.