Page MenuHomeFeedback Tracker

Add getter for all SCRIPT handles created via "spawn" SQF command
New, NormalPublic

Description

The "spawn" SQF command in Arma 3 is a powerful tool that allows the creation of new script threads. While this functionality is essential, it currently lacks a way for server administrators to retrieve all handles created via this command. This feature request proposes the addition of a getter function to address this gap.

Problem Statement
Server administrators often face challenges in identifying scripts/mods that may be causing performance issues, glitches, or bugs. Without a way to retrieve all handles created via the "spawn" command, it becomes difficult to pinpoint the problematic scripts, which are usually created by third-party mods, leading to prolonged troubleshooting and potential server instability.

Proposed Solution
I propose the addition of a getter function that allows server administrators to retrieve all handles created via the "spawn" SQF command. This function would provide a list of SCRIPT handles that could be used to terminate the scripts, along with relevant information such as the script name, execution status, and any associated variables, etc.

The feature could like:

_allHandles = allSpawnedScriptHandles;

Returns: array of SCRIPT handles spawned via SPAWN command.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 11 x64
Category
Feature Request

Event Timeline

Nerexis created this task.Aug 11 2023, 9:00 PM
Nerexis updated the task description. (Show Details)Aug 11 2023, 9:07 PM
Nerexis renamed this task from Add getter for all handles created via "spawn" SQF command to Add getter for all SCRIPT handles created via "spawn" SQF command.

I propose the addition of a getter function that allows server administrators to retrieve all handles created via the "spawn" SQF command. This function would provide a list of SCRIPT handles that could be used to terminate the scripts, along with relevant information such as the script name, execution status, and any associated variables, etc.

good idea!

dedmen added a subscriber: dedmen.Aug 18 2023, 12:10 PM

I always wanted to make a overhaul of how script handles worked.
They should also store the returned value.

So that for example scriptDone check, could return the result if it was indeed done.

Also there should be a way to get the current thing the spawned script is doing, basically call diag_stacktrace on the spawned script, via its handle.
That'll be a bigger overhaul, maybe 2.16

We have a getter for all scripts. Its diag_activeSQFScripts
It doesn't have the handle, but it would be very easy to add into there.

dedmen set Ref Ticket to AIII-55920.Aug 18 2023, 12:16 PM

Doesn't that cause some security concerns? It would allow anyone to interrupt other people's scripts.