Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What the HECK is wrong with llGetNextEmail??

Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
07-10-2004 14:05
CODE

while(TRUE)
{
llGetNextEmail("","");
}
//Does not trigger email()

for( ; TRUE ; )
{
//Why cant we just use for( ; ; )??
llGetNextEmail("","");
}
//Does not trigger email()

while(TRUE)
{
llSleep(30);
llGetNextEmail("","");
}
//Does not trigger email()

while(TRUE)
{
llSleep(180); //3 minutes
llGetNextEmail("","");
}
//Does not trigger email()

HOWEVER:
CODE

llGetNextEmail("","");
llGetNextEmail("","");
//Successfully triggers email() twice and correctly receives the messages.

I reported it. I find it hard to believe I am the first person to try using loops and sleeps instead of timers...
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
07-10-2004 14:26
Ok... d'oh... after asking some of the oldest and best scripters in the @#$@#$ world, Christopher just explained me how events queue and are only handled when the current event is done :|
Since LSL doesnt HAVE anything BUT @#$@# event handlers, this means that coding in LSL is COMPLETELY AND UTTERLY ILLOGICAL when compared to my RL programming experience.
This basically means that I will have to continue using timers, which have been found to affect Sim FPS as much as listeners. Oh, joy!
We now return to your regularly scheduled programming.
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
07-11-2004 03:27
Are you sure about timers? Doug[?] Linden said there should be zero difference between timers and while->sleep loops.
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
07-11-2004 07:15
Yeah, I'm still pretty skeptical of that myself. Who did you say had proven that, Eggy? :)
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
07-11-2004 09:21
You people have a short memory.
From:
/54/7a/16922/1.html

From: someone

wow timers are worse than i thought

128 objects with the "timer" script (included at end of post)

Sim goes from 11000 Sim FPS to 6000 Sim FPS.

please note: when i took the sim FPS measurement the timer had not gone off yet


"timer" script:
CODE

default
{

on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
llSetTimerEvent(1000.0);
}

touch_start(integer total_number)
{
llSay(0, "Touched.");
}

timer()
{
llSetTimerEvent(1000.0);
}
}
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
07-11-2004 09:24
From: someone
Originally posted by Adam Zaius
Are you sure about timers? Doug[?] Linden said there should be zero difference between timers and while->sleep loops.

If that is the intended behavior, then His Grace's tests must indicate some weird bug with the timer code. Can someone peer-review His Grace's results?
Francis Chung
This sentence no verb.
Join date: 22 Sep 2003
Posts: 918
07-11-2004 13:04
From: someone
Originally posted by Eggy Lippmann
Since LSL doesnt HAVE anything BUT @#$@# event handlers, this means that coding in LSL is COMPLETELY AND UTTERLY ILLOGICAL when compared to my RL programming experience.

It's not illogical. I'd just wager to say that you could use more RL coding experience.

Event-based programming is the de-facto norm for UI programming.

When you get into high-performance applications, event-based I/O is the way to go. It's not as convenient as multithreading with blocking I/O, but hey, nothing good ever came easy :)
_____________________
--
~If you lived here, you would be home by now~