Jump to content
Sign in to follow this  
Wandering Soulstar

llObjectDesc Question

Recommended Posts

Hi All,

In a script I am working on I use the description field to store data for persistence across resets. On start up I basically do:

 

string storage = llStringTrim(llGetObjectDesc(), STRING_TRIM);

if (storage != "")
{
     //Do some stuff with the data

}
else
{
    //Do default stuff
}

Which is all well and good, except ... if a prim has been taken into inventory with nothing entered into the desciprion field, when it rezes again it now has (no description) in the dewscription field, and so the check for "" fails. I can obviously check for that string as well, but here my question: Does the value (no description) that is added to the prim when taken into inventory change depending on the language of the user/viewer, or is consistent?

Thanks in advance!!!

 

Wanda Soulstar

Share this post


Link to post
Share on other sites

Hello Wanda!

 

I was testing it by setting my viewer language to german and i still got the object description field text in english. So it seems to be a server side action and english only, no matter what viewer language is set.

Share this post


Link to post
Share on other sites

If it's in an attachment, and your using the root prim, change it to a description of a child prim,

llGetLinkPrimitiveParams( 2, [ PRIM_DESC ]);   

If it's not in the root, it's reading the description of the prim it's in.  you could change it to read the root, llList2String(llGetLinkPrimitiveParams(LINK_ROOT, [ PRIM_DESC ]), 0); 

or use the first fix to read the prim it's in.

see caveats here:

http://wiki.secondlife.com/wiki/LlGetObjectDesc

 

 

 

 

Share this post


Link to post
Share on other sites

Thanks revochen! Should have thought of that myself. In any case decided that since I am storing my data with seperators and then parsing to a list, knowing exactly the number of items that shoul dbe thee, if there are not its an entry I can ignore.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...