Edit Dialog gives wrong link number

General discussions related to content creation
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 265 times

Re: Edit Dialog gives wrong link number

Post 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.
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 265 times

Re: Edit Dialog gives wrong link number

Post 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.
User avatar
Ilan Tochner
Posts: 6500
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4935 times
Been thanked: 4450 times
Contact:

Re: Edit Dialog gives wrong link number

Post 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.
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 265 times

Re: Edit Dialog gives wrong link number

Post 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.
User avatar
Ilan Tochner
Posts: 6500
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4935 times
Been thanked: 4450 times
Contact:

Re: Edit Dialog gives wrong link number

Post 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.
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: Edit Dialog gives wrong link number

Post 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).
Handy Low
User avatar
Ilan Tochner
Posts: 6500
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4935 times
Been thanked: 4450 times
Contact:

Re: Edit Dialog gives wrong link number

Post by Ilan Tochner »

Handy, have you tried accessing the objects by name instead of by index?
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: Edit Dialog gives wrong link number

Post 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.
Handy Low
User avatar
Ilan Tochner
Posts: 6500
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4935 times
Been thanked: 4450 times
Contact:

Re: Edit Dialog gives wrong link number

Post by Ilan Tochner »

Thank you Handy, that would be interesting to know.
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: Edit Dialog gives wrong link number

Post 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.
Handy Low
Post Reply