Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Email or Timer Not Working

Boq Beauchamp
Registered User
Join date: 3 Oct 2006
Posts: 59
05-05-2008 07:56
The following is code that I wrote to be able to remotely change a prim's texture, but it's not working. I've tried putting llSay(0, "Hello, Avatar!";) in the time event to just see if the time is working and that doesn't work either. So, I'm not sure if the email isn't being received, the timer isn't working, or both? I was attempting to send the email from another object, but just to try to get things to work I've been sending the UUID of a random texture that I have through my real life email account.


default
{
state_entry()
{
//Set Timer
llSetTimerEvent(1.0);
//Get Key
llSay(0, llGetKey());
}
timer()
{
//Receive Email
llGetNextEmail("", "";);
}

email(string time, string address, string subj, string message, integer
num_left)
{
//Set Texture
llSetTexture((string)subj, ALL_SIDES);
}
}

EDIT: I've done some testing and using Touch_Start I've been able to get object to object email to work; so, I'm thinking the problem must be with the timer.

EDIT: I've decided that emailing to the object from my regular email would actually work better than doing object to object, but the object has yet to have reacted to the email I sent. Is there a special procedure for sending emails to an in-world object?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-05-2008 09:47
It appears you should be getting to the timer event just fine. Have you checked to make sure the "Running" checkbox is filled in for the script (oh, and that the script is actually compiling and saving without error)?
Boq Beauchamp
Registered User
Join date: 3 Oct 2006
Posts: 59
05-05-2008 11:49
The script is compiling and saving fine. I haven't checked the running option but since other aspects of the script work I would assume it is checked. My next question is how long should I expect an in-bound message from an outside email to take to reach an object? I waited about an hour before I had to leave (posting this from my phone) and there was no evidence that the email had been received yet. Thanks.
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
05-05-2008 12:33
:) do you have another prim setting off the appropriate llEmail command??

http://wiki.secondlife.com/wiki/LlEmail
_____________________

Nyoko's Bodyoils @ Nyoko's Wears
http://slurl.com/secondlife/Centaur/126/251/734/
http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html

"i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
05-05-2008 12:36
Outside emails to LSL simply do not work. They may arrive six hours late, they may not arrive at all; this has been Linden confirmed on the scripters' list, the basics of the system that handles it do not scale and they recommend using something else, like llHTTPRequest.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Boq Beauchamp
Registered User
Join date: 3 Oct 2006
Posts: 59
05-05-2008 18:28
Thanks for the responses. I guess I will reformat my project to use object to object email, but I will still have to find the source of my time troubles. I have an idea for a more automated design that may remove my need for a timer that sends an email. The timer in the receiving object works fine.

Also, I do have the llEmail command in use. After further testing I discovered that it was the sending that was the problem. The code is the same as above for the timer but llEmail is used instead of llGetNextEmail.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
05-05-2008 18:39
Oh, it's the sender that messes up? llEmail has a whopping penalty, a 20 second delay is tacked on, so it doesn't behave very well with timers. You might want to put the email sending into a little script of its own, and use a link message in your timer handler to tell the emailer when to do its thing. If you need to send more than one email in 20 seconds, you might need to even use multiple helper scripts.
_____________________
Boq Beauchamp
Registered User
Join date: 3 Oct 2006
Posts: 59
05-05-2008 19:29
How do I trigger a seperate script?
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
05-06-2008 06:57
Sent a simple example round-robin mailer in world.
_____________________
Boq Beauchamp
Registered User
Join date: 3 Oct 2006
Posts: 59
05-06-2008 07:20
Thank you!