MantisBT - opensim
View Issue Details
0008154opensim[REGION] Script Functionspublic2017-04-20 06:212019-02-06 11:29
Gezebu MindBlue 
 
normalminoralways
closedfixed 
0.9.0 
master (dev code) 
Grid (1 Region per Sim)
BulletSim
Mono / Linux64
Other
firestorm
0008154: llResetOtherScript stops script execution
llResetOtherScript stops script execution that call the function.

my sandbox: OpenSim 0.9.1.0 Dev OSgrid 0.9.1.0 (Dev) c673ef7: 2017-01-22 (SIMULATION/0.3 - SIMULATION/0.6)

sandbox plaza: OpenSim 0.9.1.0 Dev 1848b1f: 2017-04-06 12:56:00 +0100 (Unix/Mono)
default
{
    state_entry()
    {
        llSay(0, "I'm Root");
    }
    
    touch_start(integer num_detected){
        integer i;
        for(i=0;i<=llGetInventoryNumber(INVENTORY_SCRIPT);i++){
            llResetOtherScript(llGetInventoryName(INVENTORY_SCRIPT,i));
        }
    }
}
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
No tags attached.
Issue History
2017-04-20 06:21Gezebu MindBlueNew Issue
2017-04-20 13:48UbitUmarovNote Added: 0031788
2017-04-20 14:08BillBlightNote Added: 0031789
2017-04-20 14:11BillBlightNote Edited: 0031789bug_revision_view_page.php?bugnote_id=31789#r6127
2017-04-20 14:19BillBlightNote Added: 0031790
2017-04-20 14:20BillBlightNote Edited: 0031790bug_revision_view_page.php?bugnote_id=31790#r6129
2017-04-20 14:37BillBlightNote Edited: 0031790bug_revision_view_page.php?bugnote_id=31790#r6130
2017-04-20 14:38BillBlightNote Edited: 0031790bug_revision_view_page.php?bugnote_id=31790#r6131
2017-04-21 02:14Gezebu MindBlueNote Added: 0031791
2017-04-21 03:07UbitUmarovNote Added: 0031792
2017-04-21 03:33Gezebu MindBlueNote Added: 0031793
2017-04-21 03:41Gezebu MindBlueStatusnew => resolved
2017-04-21 03:41Gezebu MindBlueResolutionopen => fixed
2017-04-21 03:41Gezebu MindBlueFixed in Version => master (dev code)
2019-02-06 11:29BillBlightNote Added: 0034451
2019-02-06 11:29BillBlightStatusresolved => closed

Notes
(0031788)
UbitUmarov   
2017-04-20 13:48   
This is as LSL spec.
llResetOtherScript() can reset the calling script despite its name.
you must filter out calling script name (from llGetScriptName())
of course, script names need to be unique or results maybe odd.
(0031789)
BillBlight   
2017-04-20 14:08   
(edited on: 2017-04-20 14:11)
Something like this should work, but I have not tested it so I may have the syntax off a bit ..


default
{
    state_entry()
    {
        llSay(0, "I'm Root");
    }
    
    touch_start(integer num_detected){
        integer i;
        for(i=0;i<=llGetInventoryNumber(INVENTORY_SCRIPT);i++){
            if(llGetInventoryName(INVENTORY_SCRIPT,i) != llGetScriptName())llResetOtherScript(llGetInventoryName(INVENTORY_SCRIPT,i));
        }
    }
}

(0031790)
BillBlight   
2017-04-20 14:19   
(edited on: 2017-04-20 14:38)
This one works ...

default
{
    state_entry()
    {
        llSay(0, "I'm Root");
    }
    
    touch_start(integer num_detected){
        integer totalItems = llGetInventoryNumber(INVENTORY_SCRIPT);
        integer i;
        for(i=0;i<=llGetInventoryNumber(INVENTORY_SCRIPT);i++){
            if(llGetInventoryName(INVENTORY_SCRIPT,i) != llGetScriptName() && llGetInventoryName(INVENTORY_SCRIPT,i)!="" )llResetOtherScript(llGetInventoryName(INVENTORY_SCRIPT,i));
            if(i >= totalItems)
            {
                llOwnerSay("Done");
                return;
                }
        }
    }
}

(0031791)
Gezebu MindBlue   
2017-04-21 02:14   
Obviously it is possible to use a filter to "avoid" the problem, but that does not mean that the function works well. According to the documentation this function should be able to restart the script that invokes the function, but the function puts the script "offline". Frankly, I do not understand the prevailing philosophy here, to offer alternative "solutions" to use something that works poorly, when people report something that does not work properly. I do not expect anyone to go running to fix something that is malfunctioning and I do not need. Reports are meant to inform a problem that seems is not detected previously. Maybe the incidense is minor, but function have an issue.
(0031792)
UbitUmarov   
2017-04-21 03:07   
ok, plz test master.
(0031793)
Gezebu MindBlue   
2017-04-21 03:33   
is solved. ty Ubit.
(0034451)
BillBlight   
2019-02-06 11:29   
Marked as Resolved but never closed, can be reopened if needed.