User talk:GantGrid
From OpenSimulator
(Difference between revisions)
(Created page with "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-- //--------------...") |
|||
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? | 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-- | //-Messaging Script-- | ||
//------------------- | //------------------- | ||
− | + | <source lang="lsl"> | |
default | default | ||
{ | { | ||
state_entry() | state_entry() | ||
{ | { | ||
− | |||
} | } | ||
Line 17: | Line 17: | ||
} | } | ||
} | } | ||
+ | </source> | ||
+ | |||
//------------------- | //------------------- | ||
//--Receiver Script-- | //--Receiver Script-- | ||
//------------------- | //------------------- | ||
− | + | <source lang="lsl"> | |
default | default | ||
{ | { | ||
state_entry() | state_entry() | ||
{ | { | ||
− | |||
llListen(0, "", "", ""); | llListen(0, "", "", ""); | ||
} | } | ||
Line 34: | Line 35: | ||
if(message == "Cat") | if(message == "Cat") | ||
{ | { | ||
− | llDialog(llGetOwnerKey( id ), "What do you want to do?", [], | + | llDialog(llGetOwnerKey( id ), "What do you want to do?", [], 11 ); |
− | + | ||
} | } | ||
} | } | ||
} | } | ||
− | + | </source> | |
Line 45: | Line 45: | ||
//--Error-- | //--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 | 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 | ||
Line 74: | Line 74: | ||
at System.Runtime.Remoting.Proxies.RealPr | 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 06:27, 13 February 2012
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)