|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
02-16-2005 15:29
I've got five scripts all working on tandem in one prim. One of them just threw a stack/heap collision (maybe I need six scripts  ). Question: how do I know which one? Oddly enough, all of them still have their "running" checkboxes set. What can I do to sort out which one died? Please tell me I don't have to make them constantly say "yes, I'm alive", that would be incredibly annoying...
|
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
02-16-2005 15:37
Try this: // Copyright Hugh Perkins 2004
default { state_entry() { llSay(0, "Scanning scripts..."); integer i; for( i = 0; i < llGetInventoryNumber( INVENTORY_SCRIPT ); i++ ) { if( !llGetScriptState( llGetInventoryName( INVENTORY_SCRIPT, i ) ) ) { llWhisper( 0, "Script " + llGetInventoryName( INVENTORY_SCRIPT, i ) + " is stopped" ); } } llRemoveInventory( llGetScriptName() ); } }
|
|
Antagonistic Protagonist
Zeta
Join date: 29 Jun 2003
Posts: 467
|
02-16-2005 15:46
Unfortunately, unless something has changed, the posted example will not work for your purposes. As per the wikki, scripts that die due to stack/heap collisons do not report their state as FALSE. http://secondlife.com/badgeo/wakka.php?wakka=llGetScriptStateOf course, the wikki could simply need updating and this issue has been fixed. Which would be cool. Yet, as far as I know there really isnt a simple way to tell. -AP
|
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
02-16-2005 16:01
Was fixed last year AFAIK.
|