User talk:GantGrid

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Blanked the page)
Line 1: Line 1:
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--
 
//-------------------
 
<source lang="lsl">
 
default
 
{
 
    state_entry()
 
    {
 
    }
 
 
    touch_start(integer total_number)
 
    {
 
        llSay(0, "Cat");
 
    }
 
}
 
</source>
 
 
 
//-------------------
 
//--Receiver Script--
 
//-------------------
 
<source lang="lsl">
 
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 );
 
        }
 
    }
 
}
 
</source>
 
 
 
//---------
 
//--Error--
 
//---------
 
//----------------------------------------------------------------------------------------------------------------
 
<pre>
 
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
 
//------------------------------------------------------------------------------------------------------------------
 
</pre>
 
 
----
 
 
: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:
 
:<source lang="lsl">llDialog(id, "What do you want to do?", ["Button 1"],  11 );</source>
 
:But make sure you set up a llListen on channel 11 for this.
 
:--[[User:Fritigern|Fritigern]] 06:27, 13 February 2012 (PST)
 

Revision as of 08:09, 13 February 2012

Personal tools
General
About This Wiki