Could someone help please? I am trying to use shout/listen function to make two objects communicate with each other, but the receiver seems not pick up the message and does nothing.
Caller object:
touch_start(integer total_number)
{
//get object attributes first
string desc = (string) llGetObjectDetails(llGetKey(),[OBJECT_DESC]);
string OType = llGetSubString(desc, 0, 1); //ge the first two letters as the type id
llShout(401, "callDatabase" +OType);
}
Receiver object:
integer lchannel = 401;
default
{
state_entry()
{
//listen_handle=llListen(lchannel, "", NULL_KEY, ""
;llListen(lchannel, "", "", ""
;}
listen( integer channel, string name, key id, string message )
{
llSay( 0, message );
string command = llGetSubString(message, 0, 11);
llSay( 0, message );
if( command== "callDatabase" )
{
llSay( 0, "A call is received " );
}
}
}