Hello
I want to combind these two scripts
default
{
touch_start(integer total_number)
{
if (llDetectedGroup(0) ) //same as llSameGroup(llDetectedKey(0) ) (with llSameGroup, detected must be in the sim)
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT, 0) );
else
llSay(0, "Wrong active group!");
}
}
integer gListener;
default
{
touch_start(integer total_number)
{
// See 'discussion' page for more comments on choosing a channel and possible left-open listener
integer channel = -13572468;
// "" saves byte-code over NULL_KEY
gListener = llListen( channel, "", "", "");
llTextBox(llDetectedKey(0), "Some info text for the top of the window...", channel);
}
listen(integer channel, string name, key id, string message)
{
llListenRemove(gListener);
llSay(0, "You wrote: " + message);
}
}
1. Check if the avatar that touched have the correct active group.
2. If yes then open a text box is where the output comes in local chat name on the prime.
Else : You should receive a text saying that the group is wrong.
When i try to combind these two scrips it fails.