Jump to content

Simnelia Petrichor

Resident
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Simnelia Petrichor

  1. 19 hours ago, Rolig Loon said:

    The specific advice in the LSL wiki is

    An error will be shouted on DEBUG_CHANNEL, if...

    • there are more than 12 buttons.
    • any list item is not a string.
    • any list item string length (measured in bytes, using UTF-8 encoding) is zero or greater than 24.
      • In other words, a button's text when encoded as UTF-8 cannot be longer than 24 bytes or a empty string.
      • This snippet can be used to truncate the string without giving an error: llBase64ToString(llGetSubString(llStringToBase64(theString), 0, 31))

    Give it a shot..

    Thanks for all the responses - this is the way I'll go.  Slightly embarrassed with myself that I didn't see it in the wiki now!

  2. So I want to use llDialog to display a list of the display names of nearby avatars gathered by llSensor.  I know that a button can't have a label longer than 24 characters so I use llGetSubString to make sure none of the names exceed that.

    My problem is, one of the nearby avatars has the name "Riley 横バ火".

    LSL has no problem with that - it considers it to be 9 characters long.  But put it on a button in llDialog and you get an error - "button labels must be 24 or fewer characters long".

    Experimenting, I find I can make a button that displays the first 8 characters of the name.  I can also display the last 8 characters of the name.  It's as though the button treats each character of the name as being 3 characters long.

    Anyone seen this issue before?  Any advice?

×
×
  • Create New...