Hallo!
Ich bin Lehrer und wir haben an unserer Schule ein Schul-Grid.
Ich verwende den Firestorm Viewer.
Leider kann ich über den Server und dessen Einstellungen noch keine Angaben machen.
Es gibt ein Problem mit Attachments:
Wenn ich das Script des Attachments starte, wird das Attachment nicht angehängt.
Stattdessen erhalte ich die Error Message: "System.InvalidCastException: Cannot cast from source type to destination type."
Es scheint sich nicht um einen Script-Error zu handeln, sondern scheint mit der Architektur der Software zusammenzuhängen.
Hat jemand von euch vielleicht eine Idee, wie man das Problem lösen könnte?
Ich poste Script und Error-Message unten.
Vielen Dank im Voraus!
script:
error message:
	
	
	
Ich bin Lehrer und wir haben an unserer Schule ein Schul-Grid.
Ich verwende den Firestorm Viewer.
Leider kann ich über den Server und dessen Einstellungen noch keine Angaben machen.
Es gibt ein Problem mit Attachments:
Wenn ich das Script des Attachments starte, wird das Attachment nicht angehängt.
Stattdessen erhalte ich die Error Message: "System.InvalidCastException: Cannot cast from source type to destination type."
Es scheint sich nicht um einen Script-Error zu handeln, sondern scheint mit der Architektur der Software zusammenzuhängen.
Hat jemand von euch vielleicht eine Idee, wie man das Problem lösen könnte?
Ich poste Script und Error-Message unten.
Vielen Dank im Voraus!
script:
Code:
// 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;
 
default
{
 
    touch_start(integer num)
    {
        if (gAttach)  // Object has not been attached yet
        {
            llRequestPermissions(llDetectedKey(0),PERMISSION_ATTACH);
            gAttach = FALSE;
        }
        else   // Object has been attached, but you still need PERMISSION_ATTACH in order to detach the object
        {
            if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH)
            {
                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
        {
            llRequestPermissions(id,PERMISSION_ATTACH | PERMISSION_TRIGGER_ANIMATION);
        }
    }
 
    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
        {
            if (perm & PERMISSION_ATTACH | PERMISSION_TRIGGER_ANIMATION)
            {
                llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION,0));
            }
        }
    }
}error message:
Zitat:[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


![[Bild: style6,Servex-Grid.png]](http://www.sloganizer.net/style6,Servex-Grid.png)