Any variable length fields in the packets are stored as byte arrays (byte[]). If you try and do a .ToString() on a byte array you won't get anything interesting, what you want is something like this:

byte[] byteArray = (byte[])field.Data; // Variable length fields are byte arrays string output = System.Text.Encoding.ASCII.GetChars(byteArray, 0, byteArray.Length); // Convert the byte[] to a string output.Replace("\0", ""); // Remove the null terminator from the end of the string

I know that's a pain, libsl will have a helper function that converts byte arrays to strings soon.

John

_______________________________________________
libsecondlife-dev mailing list
libsecondlife-dev@gna.org
https://mail.gna.org/listinfo/libsecondlife-dev

Reply via email to