User talk:GantGrid

From OpenSimulator

Revision as of 06:27, 13 February 2012 by Fritigern (Talk | contribs)

Jump to: navigation, search

I'm running into this error when I send a message from one object to the other on the receiving end.Any Suggestions?


//------------------- //-Messaging Script-- //-------------------

default
{
    state_entry()
    {
    }
 
    touch_start(integer total_number)
    {
        llSay(0, "Cat");
    }
}


//------------------- //--Receiver Script-- //-------------------

default
{
    state_entry()
    {
        llListen(0, "", "", "");
    }
 
    listen( integer channel, string name, key id, string message )
    {
        if(message == "Cat")
       {
           llDialog(llGetOwnerKey( id ), "What do you want to do?", [],  11 );
        }
    }
}


//--------- //--Error-- //--------- //----------------------------------------------------------------------------------------------------------------

Primitive: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: LSL Runtime Error: No less than 1 button can be shown



Server stack trace: 

   at OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.LSLError(String msg)

   at OpenSim.Region.ScriptEngine.Shared.Api.LSL_Api.llDialog(String avatar, String message, 
list buttons, Int32 chat_channel)

   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[]
 args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md,
 Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)

   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, 
Int32 methodPtr,
 Boolean fExecuteInContext)



Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealPr
//------------------------------------------------------------------------------------------------------------------

The solution is in the error message. You can't show less than one button on a dialog box.
Change the line with llDialog to at least:
llDialog(id, "What do you want to do?", ["Button 1"],  11 );
But make sure you set up a llListen on channel 11 for this.
--Fritigern 06:27, 13 February 2012 (PST)
Personal tools
General
About This Wiki