Page MenuHomeFeedback Tracker

_thisScript is not defined within remoteExec calls
New, 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.Fri, Feb 14, 3:17 AM