Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006562opensim[REGION] Scripting Enginepublic2013-03-04 12:312014-12-28 00:07
ReporterDiva 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0006562: XEngine is confused about types of constants in llAttachToAvatarTemp
DescriptionIt looks like XEngine has some mismatch regarding the types of some LSL constants for llAttachToAvatarTemp. This doesn't happen for llAttachToAvatar.
Steps To ReproducePlace this script on a cube, and touch the cube. You'll get a runtime error.

integer i = 0;

default
{
    state_entry()
    {
        llSay(0, "Script running");
    }
    
    touch_start(integer n)
    {
        if (i == 0)
        {
            i++;
            llRequestPermissions(llDetectedKey(0), PERMISSION_ATTACH);
        }
        else
            llDie();
    }
    
    run_time_permissions( integer vBitPermissions )
    {
        if( vBitPermissions & PERMISSION_ATTACH )
        {
            llAttachToAvatarTemp( ATTACH_LHAND );
        }
        else
        {
            llOwnerSay( "Permission to attach denied" );
        }
    }
}
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics, ODE, BulletSim
EnvironmentUnknown
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0027143)
greg0254 (reporter)
2014-12-28 00:07

This is still an issue with r/25604 commit f3ab7c0f5c76. The message it produces is:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> OpenSim.Region.ScriptEngine.Shared.ScriptException: MOD Runtime Error: llAttachToAvatarTemp: parameter type mismatch; expecting Int32, type(parm)=System.Int32

A workaround is to add a redundant cast to the parameter, e.g. llAttachToAvatarTemp( (integer)ATTACH_LHAND );

(I'm also curious as to why it's necessary to enable MOD functions for temp attachments to work, if anyone cares to explain this.)

- Issue History
Date Modified Username Field Change
2013-03-04 12:31 Diva New Issue
2014-12-28 00:07 greg0254 Note Added: 0027143


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker