Page 2 of 3

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 2:37 am
by Mike Lorrey
Ilan Tochner wrote:In which version of the item ("Key Pad (1)" or "Key Pad")?
Key Pad (1), since you wanted me to put the link number in the prim name, I put it in there.

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 3:13 am
by Mike Lorrey
I put down in the prim name the link number that the edit dialog says it is. The actual script function llGetLinkNumber() gives different results. I renamed those prims but the earlier version had the number buttons have the number of the button in the prim name for the script to handle as a key code system.

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 5:55 am
by Ilan Tochner
The inventory system now shows the objects linkest order for "Key Pad (1)" matching the names you gave them. If you gave those names according to the Edit dialog then the edit dialog is showing the objects in the correct order.

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 6:23 pm
by Mike Lorrey
Ilan Tochner wrote:The inventory system now shows the objects linkest order for "Key Pad (1)" matching the names you gave them. If you gave those names according to the Edit dialog then the edit dialog is showing the objects in the correct order.
That is the problem, as I have been saying, because according to scripts, that is NOT the link order. If I refer to link 2 with llSetPrimParametersFast(), it modifies link 13, not link 2. When I run llGetLinkNumber(), it identifies link 2 as link 13, and link 13 as link 2. Since knowing which link is which link number is relevant solely to script function, this is a problem that needs addressing.

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 8:49 pm
by Ilan Tochner
The edit dialog displays objects in the order they appear in the database. In other words, it is working as it should.

According to http://wiki.secondlife.com/wiki/LlSetPrimitiveParams if you're working with linksets your should be using llSetLinkPrimitiveParamsFast not llSetPrimitiveParams. Also note http://wiki.secondlife.com/wiki/Categor ... structions, you should probably reference linked objects by name not by index.

Re: Edit Dialog gives wrong link number

Posted: Wed Apr 05, 2017 11:27 pm
by Handy Low
Ilan, there definitely is a problem with this. I too have to drop a script into objects which tells me which link number is which, because the number shown in the viewer edit window is frequently wrong. I never rely on it in OpenSim, and haven't for years (it's a long-standing bug).

Re: Edit Dialog gives wrong link number

Posted: Thu Apr 06, 2017 5:32 am
by Ilan Tochner
Handy, have you tried accessing the objects by name instead of by index?

Re: Edit Dialog gives wrong link number

Posted: Thu Apr 06, 2017 11:39 am
by Handy Low
Of course - in a normal script it would be madness not to.

But sometimes when developing or debugging it's useful to be able to know quickly the link number of a given prim, and it would save time here and there if we could just rely on the edit floater's reported number instead of having to drop in a script.

I wish I could remember if the bug is present in SL - that would tell us if it's viewer-side (which I suspect it is) or an OpenSim issue.

Re: Edit Dialog gives wrong link number

Posted: Thu Apr 06, 2017 2:41 pm
by Ilan Tochner
Thank you Handy, that would be interesting to know.

Re: Edit Dialog gives wrong link number

Posted: Thu Apr 06, 2017 3:17 pm
by Handy Low
It does seem to be client-side, at least according to this thread in the Firestorm JIRA. And it's not just Firestorm, but all viewers, and it's at least 7 years old. In fact, it's likely that the number shown never was reliable.

They mention that if a linkset is re-rezzed the link numbers are OK. That would explain why you weren't able to see the problems with Mike's test object.