Jump to content

llRegionSayTo not working?


Cash Button
 Share

You are about to reply to a thread that has been inactive for 3852 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

For some reason llRegionSayTo isnt working for me, but when i give a copy of the scripted object to a friend in the same region it does work.

It uses the zero channel and I've added a llSay to say the "key target" as a check, which is correct.

The script has been reset several times and i've relogged also, but to no avail.

Has anyone else experienced this?

 

Link to comment
Share on other sites

No, i would need to see the script to see what is happenning, also yesterday alot of odd things were happening to scripts. There not alot to go wrong with the function only the wrong info or if you storing the UUID it not being called correctly or is being lost thru a event or state change.

ADDED: Storing as in soft coded.

Link to comment
Share on other sites

The llRegionSayTo is in the listen event and responds to a dialog menu button

These two test lines have been added in that relevant section ie:

if (message == "xxx")
{
          llSay(0, "avinmenu = " + (string)avinmenu);
          llRegionSayTo (avinmenu, 0, "Boo");

          other stuff follows
}

The llSay tells me that the information stored in avinmenu is correct, which is my avatars key, initially obtained in a touch event

The llRegionSayTo does NOT appear in my chat window

avinmenu is declared as global variable, ie: key avinmenu;
and is equated to llDetectedKey(0) in the touch event when obtaining the dialog menu

And as i said, it works for my friend in the same region

Link to comment
Share on other sites

Well, sure - I've never known LSL to stand on principle. If timing's important I can see it being an issue. I've never tried this, so all I have are guesses.

My completely uninformed guess would be that maybe it is profiling you (as the creator) as being the same as the object itself.

If you get your friend to copy-paste your script (or just the relevant parts) into their own scripts/objects, does it still work for them? If no, it's possible that this is a bugged implementation of the command.

My only other guess is maybe it's your viewer. I don't know if llRegionSayTo calls the same viewer functions as object-IMs, if it doesn't then the implementation may vary by viewer.

Might help narrow it down, but won't fix anything for you.

Link to comment
Share on other sites

Be sure that avinmenu is actually a key rather than a string when you go to use it in llRegionSayTo.  It's an easy mistake to make and it's hard to detect with the test you are using, since your llSay statement is explcitly saying (string)avinmenu.  Try writing your llRegionSayTo statement as

llRegionSayTo((key)avinmenu,0,"Say your message here");

and see what happens.

Link to comment
Share on other sites

//global
list gAviMenu_key = [];

//code
gAviMenu_key = [];//ADDED This is if you wanted the list cleaned
gAviMenu_key = llListInsertList(gAviMenu_key, [message], 0);//the meesage bit you have to change to what siuts your purpose


llRegionSayTo(string)gAviMenu_key,0,"hie");

If you have key = "565656565666565665656566" it will not work, When called. When i global

list    gAviMenu_key 	= [];key myKey;default{	state_entry()	{		//llSay(0, "Hello, Avatar!");	}	touch_start(integer total_number)	{		//myKey = llGetOwner();		myKey = llDetectedKey(0);		//myKey = llGetOwnerKey(llGetKey());// inever use this, just for example		gAviMenu_key = [];		gAviMenu_key= llListInsertList(gAviMenu_key, [myKey], 0);		llRegionSayTo((string)gAviMenu_key, 0,"hie");		llSay(0,(string)gAviMenu_key);	}}

 

 

Link to comment
Share on other sites


Cash Button wrote:

avinmenu is declared as global variable, ie: key avinmenu;

if it wasnt a valid key, surely it would say "00000000-0000-0000-0000-000000000000" when converted to a string

and
llRegionSayTo ((key)avinmenu, 0, "Boo"); 
 made no difference

I wasn't questioning whether it was a valid key, but whether it was typecast correctly in the first place.  Keys are funny things.  They are a special type of string, so a lot of the time you can treat them as if they are regular strings.  Other times, you have to explicitly typecast them as keys to get your script to believe them.  If you had defined

string My_key = "a822ff2b-ff02-461d-b45d-dcd10a2de0c2"

you could have printed it out in chat with no problem, but llRegionSayTo would not have treated it as a key unless you typecast it as (key)My_Key first. It would have just failed silently.

Still, since you DID typecast it properly, that's not the problem.  Back to the drawing board.

Link to comment
Share on other sites

Cash, have you tried a copy/paste of the code into a new script in a new prim? Years ago I had a scripted prim that just would not behave. I copied the script into a new prim... no go. Then I copied the script text into a new script in a new prim and bingo!

I've no reason to believe this will work for you, but maybe it's worth a try?

Link to comment
Share on other sites


Cash Button wrote:

if it wasnt a valid key, surely it would say "00000000-0000-0000-0000-000000000000" when converted to a string

 

I doubt that.

This script returns "peggy-sue"

key K;default{    state_entry()    {        K = (key)"peggy-sue";    }    touch_start(integer total_number)    {        llOwnerSay((string)K);    }}

 :smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

@Madelaine - Thanks for the suggestion, tried it, no difference

@Freya - Yes is seems something is profiling me somehow

Current tests done:

The current rezzed object owned by me wont do llRegionSayTo to me or other avatars, in my home sim

 

created new prims and new scripts, it still wont do llRegionSayTo to me or other avatars, in my home sim

created a new object, with a new script just to do a llRegionSayTo, a llSay & a llInstantMessage on touch, the llRegionSayTo doesnt work but the others do, in my home sim.

Gave the original object to another avatar to rez and the llRegionSayTo works for her and me, in my home sim

Went to a different region and the original object works as do the other test objects with llRegionSayTo!

So, It seems this isnt a script problem but this sim stopping all llRegionSayTo from any object that I own

My next step is to see if another object owned by me here is blocking me somehow. So I'm going to take each of my objects one at a time and hopefully I'll find a single object that is blocking me.

Any other suggestions would be welcomed :)

Link to comment
Share on other sites

When you say it works for your friend but not for you, is your friend talking to you or themself when it works?

 

I noticed this in the LS portal , and wondered if your viewer's anti-spam filter was somehow kicking in:

 

Caveats

  • Messages sent on PUBLIC_CHANNELare throttled to a rate of <200/10sec, per region, per owner/user.
    • Once the rate is exceeded, all following messages on PUBLIC_CHANNEL will be dropped until the send rate is again below 200/2sec for the previous 2 sec. Dropped messages, despite being dropped still count against the limit.

     

Link to comment
Share on other sites


Profaitchikenz Haiku wrote:

When you say it works for your friend but not for you, is your friend talking to you or themself when it works?

 

I noticed this in the LS portal , and wondered if your viewer's anti-spam filter was somehow kicking in:

 

Caveats
  • Messages sent on
    are throttled to a rate of <200/10sec, per region, per owner/user.
    • Once the rate is exceeded, all following messages on
      will be dropped until the send rate is again below 200/2sec for the previous 2 sec. Dropped messages, despite being dropped still count against the limit.

     

That happened to me once, and I bet that's what it is.  

It's not the viewer, though; the sim imposes the block, and it imposes it on all items you own.   It's easily done (very easily if you're me) by messing up with a loop while you're making something, so it keeps on endlessly trying to call llRegionSayTo at high speed rather than completing the loop.    It's an anti-griefer measure.

Fixing it is a bit harder.   The only solution I can think of is to locate the object (objects?) that's causing the problem, deleting it and then restarting the sim.    That's how I fixed it, anyway.

Link to comment
Share on other sites

I took ALL my objects from the region and rezzed an object with a simple one line script to check - still didnt work

Then I requested and got a region restart - Problem solved!!

@Innula, yes very easy to mess up when scripting, however I'm aware of the llRegionSayTo throttle and am confident that wasn't the problem. The object I've been working on recently doesn't use it in a loop.

Still baffled why it happened, I guess i'll put it down to the SL factor!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3852 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...