Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sometimes listen event doesn't work

Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-13-2005 11:26
Have you experienced that listen event becomes not to work without any reason? I've recently experienced it a couple of times. It occured in link_message today, too. Strange to tell, if you copy the script text into the new file, it becomes to work. I wasted much time for it. :(
_____________________
:) Seagel Neville :)
Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
08-13-2005 13:52
Hi Seagel! You're english is getting to be very good. :)

Post some of this "not working" code and we can tell you what's wrong.
_____________________
Other than that, Mrs. Lincoln, how was the play?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
08-13-2005 18:17
今日は シゲルさん!
konnnichiwa shigerusan! :)
The script may be removing the listen handle somewhere you dont expect, but I cant be sure unless you post the script. The listen event is a bit of an oddity; it seems to have a much larger queue seperate from that of the other events. Normally, the script can only have 64 events queued up before the system begins dropping them, this applies to link_messages as well. Listen events dont seem to drop, but the more that are queued, the more the script slows down.

How often is the script receiving chat?
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
08-13-2005 18:56
Some times teleporting can cause a an active listen to become inactive. In those case it's best to shut down the listen, and start a new one. Luckily it's posable to detect teleport. Also it's good to make sure your sending command to the right text channel.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-13-2005 19:05
:D My English must have been rather awful! Sorry for that. :D

1. It is the exact same between "not working" code and "working-well" one. Because I just copied all code from "not working" one into the new one which would work well. Though I can post my code here, I suspect wheather it's worth.

2. The "not working" code doesn't work forever. So I had to copy and paste, and delete it.

I believe this code is also repeatable.
The speaker code
CODE
default
{
touch_start(integer n)
{
llMessageLinked(LINK_THIS, 10, "Hey", NULL_KEY);
}
}
The receiver code
CODE
default
{
link_message(integer sender_num, integer num, string str, key id)
{
llOwnerSay("sender_num is " + (string)sender_num + " num is " + (string)num + " str is " + str + "key is " + (string)id);
}
}
Just put these two scripts into a default prim cube and touch it. ;)
But it always works. I'm not sure why it becomes not to work.
_____________________
:) Seagel Neville :)
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
Hey repeatable easily :D
08-13-2005 19:55
There is an easy way to follow this trouble.
Try to make a new folder in your inventory.
Put those scripts above into the folder.
Make a new cube on ground and open contents tab.
Drag and copy the folder into the cube.
You'll find just two scripts in the cube.
But it doesn't work at all. ;)
One of my experiences was occured because of that way.
But others are not. I don't know why it occured.
_____________________
:) Seagel Neville :)
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
08-13-2005 19:59
I know the problem!

When you insert scripts into an object by dragging a folder over, the scrpts "run" boxes are unchecked.

To fix, after dragging the folder over, select the object. Then under the "Tools" menu, select "Set scripts to Running in selection". Or you can open each and check the run box in the lower left corner of the script editor.
_____________________
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-13-2005 20:21
Yay, Jillian! :eek: Thank you. I've not noticed such running check box!

After doing above, I tried to do what you said.
In case of Tools menu, It said "Not able to set any scripts to running. Select objects with scripts that you have permission to modify." And I couldn't change it to run. :( Made sure a cube and scripts are all modifiable. Why don't I have permissions to modify for it?
In case of the run box, even when I checked on the box, "save" button doesn't activate. So I had to change and change back the code a bit to save. But it worked. :) Thank you.
I will take care of this box from now on. :)

Adding:
I found another way to have uncheckd running box. ;) If you drag and copy your script which has the exact same name with the one in the object inventory from your inventory, you'll find the new one's name let to be added number on the end of the name. Note that the new one will be also changed the running box unchecked.
_____________________
:) Seagel Neville :)
Blain Candour
Registered User
Join date: 17 Jun 2005
Posts: 83
08-14-2005 23:46
You do not need to save a script to set it to running by checking the box. Just check the box then close the script and you are good to go.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
08-15-2005 00:17
Blain, have you tiried that? I tried and made sure it was uncheckd again unless I saved it. Did I miss anything? :confused:

EDIT1:
Ok, I checked. Usually, you can change the running check box without saving. But when you do drag and copy a foldr included scripts from your inventory into the objcet's one, you have to save it to keep changing the check box. You should be careful about this.
And just copying the same file thingy, It might be my mistake. It didn't change unchecked when I tried it again.

EDIT2:
hehe, I put down here what I found by stealth.
When you copy your script from your inventory into the object inventory, if there is the same name's script in the object and it unchecked the running box, the new one would also make to be unchecked.
_____________________
:) Seagel Neville :)