Page MenuHomeFeedback Tracker

_thisScript is not defined within remoteExec calls
Acknowledged, NormalPublic

Description

Despite remoteExec being a scheduled environment execution (vs unscheduled remoteExecCall), it does not have _thisScript defined.
This makes it impossible to terminate an overall thread via terminating and sleeping.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
test_func = {
    try {
        systemChat "Start";
        throw "Script hits error";
    } catch {
        systemChat _exception;
        terminate _thisScript;
        uiSleep 1;
        systemChat "Should not be seen";
    }
};

[] spawn test_func; // Works as _thisScript is defined
[] remoteExec ["test_func"]; // Does not work as _thisScript is not defined

Event Timeline

Jaffa created this task.Feb 14 2020, 3:17 AM
dedmen claimed this task.Mar 24 2020, 3:32 PM
dedmen changed the task status from New to Acknowledged.