Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005489opensim[REGION] Scripting Enginepublic2011-05-19 06:302014-07-29 20:40
Reporteronesong 
Assigned Tojustincc 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0005489: llGetLinkNumberOfSides currently uninplemented!
DescriptionI was playing around with some scripts of mine when I tried to use llGetLinkNumberOfSides it would give a strange error message: "Does not exist in the current context". Spoke to Bluewall and he pointed out that the function wasn't even implemented or noted as *NotImplemented.

Here is my proposed fix bellow on Additional Information.

It looks like it would work but I never coded in C# before, nor do I know anything about OpenSim development, I only have ASM/C/Javascript/PHP/SQL/C++ and LSL experience. I only spent 10 minutes learning by looking around the current codebase to attempt to figure out a fix. So please correct it if its wrong. Cheers!
Additional Information// One Song's Implementation

public LSL_Integer llGetLinkNumberOfSides(int linknumber)
        {
            m_host.AddScriptLPS(1);
            
            SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
            
            return part.GetNumberOfSides();
        }
TagsNo tags attached.
Git Revision or version number584bce36acd00c2e5cc10d3cd8eb6f491acaca13
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics
EnvironmentMono / Linux64
Mono Version2.6.3
Viewer
Attached Files

- Relationships

-  Notes
(0018452)
justincc (administrator)
2011-05-20 19:23

Thanks onesong. Good attempt for someone not familiar with the codebase (or C#) :). I used this as base for an implementation that also handles LINK_ROOT and LINK_THIS, and reuses the GetNumberOfSides() method available in LSL_Api.cs. This is commit 9fc29e1 is you want to look at it in git master. Testing appreciated.
(0020752)
nebadon (administrator)
2012-02-02 01:46
edited on: 2012-02-02 01:47

Just tested this function and it appears to not work :
----
default
{
    state_entry()
    {
        // Set the hovertext to indicate the number of sides
        integer numOfSides = llGetLinkNumberOfSides(LINK_ROOT);
        llOwnerSay( "The root prim has " + (string)numOfSides + " sides." );
    }
}
----
(5,29): Error CS0103: The name 'llGetLinkNumberOfSides' does not exist in current context

(0020753)
danbanner (reporter)
2012-02-02 01:52

Same results for me as well, OpenSim 0.7.3 Dev 003bd9f: 2012-02-01
(0020760)
justincc (administrator)
2012-02-02 22:51

Oops, forgot to add this to the interfaces originally. Should now be available from git master 264c83a
(0020764)
justincc (administrator)
2012-02-02 23:36

Ooops, I meant 54d473e :)

- Issue History
Date Modified Username Field Change
2011-05-19 06:30 onesong New Issue
2011-05-19 06:30 onesong Git Revision => 584bce36acd00c2e5cc10d3cd8eb6f491acaca13
2011-05-19 06:30 onesong SVN Revision => 0
2011-05-19 06:30 onesong Run Mode => Grid (Multiple Regions per Sim)
2011-05-19 06:30 onesong Physics Engine => BasicPhysics
2011-05-19 06:30 onesong Environment => Mono / Linux64
2011-05-19 06:30 onesong Mono Version => 2.6.3
2011-05-19 06:40 onesong Status new => patch included
2011-05-20 19:23 justincc Status patch included => closed
2011-05-20 19:23 justincc Note Added: 0018452
2011-05-20 19:23 justincc Resolution open => fixed
2011-05-20 19:24 justincc Status closed => feedback
2011-05-20 19:24 justincc Resolution fixed => reopened
2011-05-20 19:24 justincc Status feedback => resolved
2011-05-20 19:24 justincc Resolution reopened => fixed
2011-05-20 19:24 justincc Assigned To => justincc
2012-02-02 01:46 nebadon Note Added: 0020752
2012-02-02 01:46 nebadon Status resolved => feedback
2012-02-02 01:46 nebadon Resolution fixed => reopened
2012-02-02 01:47 nebadon Note Edited: 0020752 View Revisions
2012-02-02 01:52 danbanner Note Added: 0020753
2012-02-02 22:51 justincc Note Added: 0020760
2012-02-02 22:51 justincc Status feedback => resolved
2012-02-02 22:51 justincc Resolution reopened => fixed
2012-02-02 23:36 justincc Note Added: 0020764
2014-07-29 20:40 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker