Change font size
It is currently Thu Sep 24, 2020 10:57 pm

Forum rules

. please keep questions related to an OpenSimulator and OSgrid nature.

Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: attachments not working on educational grid
PostPosted: Sat Nov 16, 2019 9:22 am 
Furious Typer

Joined: Mon Feb 13, 2017 1:53 pm
Posts: 98
I'm a teacher and at our school we have an educational grid hosting our school sim.
Unfortunately, I cannot give you any information about the server and its settings at this point.

There is a problem with attachments:

When I start the script of the attachment, the attachment is not attached.
Instead, I get the error message: "System.InvalidCastException: Cannot cast from source type to destination type."

It doesn't seem to be a script error but seems to have to do with the architecture of the grid.
Do you maybe have an idea how to solve this?

I'm posting both the script and the error message below.
Thank you very much in advance!
// This example illustrates how to handle permissions before and after llAttachToAvatarTemp has been called. Because ownership
// changes when the object is attached, the initial PERMISSION_ATTACH is revoked and new permissions need to be requested.

integer gAttach = TRUE;


    touch_start(integer num)
        if (gAttach)  // Object has not been attached yet
            gAttach = FALSE;
        else   // Object has been attached, but you still need PERMISSION_ATTACH in order to detach the object
                llDetachFromAvatar();  // Note that the object vanishes when detached, so there is no need to set gAttach = TRUE again

    attach(key id)
        if (id)  // Object has been attached, so request permissions again

    run_time_permissions (integer perm)
        if (!gAttach)  //First time
            if (perm & PERMISSION_ATTACH)
                gAttach = TRUE;
                llAttachToAvatarTemp(ATTACH_HEAD);  // Initial PERMISSION_ATTACH is revoked at this point
        else  // Second time

error message:
[06:09] Module command functions not enabled
[06:09] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Server stack trace:
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at OpenSim.Region.ScriptEngine.Shared.ScriptBase.Executor.ExecuteEvent (System.String state, System.String FunctionName, System.Object[] args) [0x00000] in <filename unknown>:0

Exception rethrown at [0]:
---> System.InvalidCastException: Cannot cast from source type to destination type.

Server stack trace:
at OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.modInvokeI (System.String fname, System.Object[] parms) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) OpenSim.Region.ScriptEngin

Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of