diag activeSQFScripts: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}")
m (Some wiki formatting)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:diag_activeSQFScripts}}
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
|version1= 1.44


|1.44
|gr1= Diagnostic


|gr1= Diagnosis
|descr= Returns information about active [[SQF Syntax|SQF]] scripts. To see number of all scripts currently in the scheduler use [[diag_activeScripts]].


| Returns information about active [[SQF]] scripts. To see number of all scripts currently in the scheduler use [[diag_activeScripts]].
|s1= [[diag_activeSQFScripts]]


| [[diag_activeSQFScripts]]
|r1= [[Array]] of [[Array]]s - to format [<nowiki/>[scriptName, fileName, isRunning, currentLine], ...]:
 
* scriptName: [[String]] - Returns:
| [[Array]] of [[Array|Arrays]] - to format [<nowiki/>[scriptName, fileName, isRunning, currentLine], ...]:
** Script name set with [[scriptName]]
* scriptName: [[String]] - function or filename. Custom name can be set with [[scriptName]]
** File name if script name is empty
* fileName: [[String]]
** <spawn> + first 100 characters if script name and file name are both empty
* filePath: [[String]] - path of the parent script
* isRunning: [[Boolean]]
* isRunning: [[Boolean]]
* currentLine: [[Number]] - line currently executing
* currentLine: [[Number]] - line currently executing


|x1= <code>[] [[spawn]] { [[hint]] [[str]] [[diag_activeSQFScripts]]; }; {{codecomment|// displays [<nowiki/>["<spawn> hint str diag_activeSQFScripts;", "", true, 1]]}}</code>
|x1= <sqf>0 spawn { hint str diag_activeSQFScripts; }; // displays [["<spawn> hint str diag_activeSQFScripts;", "", true, 1]]</sqf>


|x2= <code>[] [[spawn]] {
|x2= <sqf>
[[hint]] [[str]] [[diag_activeSQFScripts]]; {{cc| displays [<nowiki/>["<spawn> hint str diag_activeSQFScripts;", "", true, '''2''']]}}};</code>
0 spawn {
hint str diag_activeSQFScripts; // displays [["<spawn> hint str diag_activeSQFScripts;", "", true, 2]]
};
</sqf>


|x3= <code>[] [[spawn]] {
|x3= <sqf>
[[scriptName]] "aScript";  
0 spawn {
[[hint]] [[str]] [[diag_activeSQFScripts]]; {{cc| displays [<nowiki/>['''"aScript"''', "", true, 3]]}}};</code>
scriptName "aScript";
hint str diag_activeSQFScripts; // displays [<nowiki/>["aScript", "", true, 3]]
};
</sqf>


| [[diag_log]], [[diag_fps]], [[diag_fpsmin]], [[diag_frameNo]], [[diag_tickTime]], [[diag_activeSQSScripts]], [[diag_activeMissionFSMs]], [[diag_activeScripts]], [[execVM]], [[spawn]]
|seealso= [[diag_log]] [[diag_fps]] [[diag_fpsmin]] [[diag_frameNo]] [[diag_tickTime]] [[diag_activeSQSScripts]] [[diag_activeMissionFSMs]] [[diag_activeScripts]] [[execVM]] [[spawn]]
}}
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}

Latest revision as of 19:45, 7 April 2024

Hover & click on the images for description

Description

Description:
Returns information about active SQF scripts. To see number of all scripts currently in the scheduler use diag_activeScripts.
Groups:
Diagnostic

Syntax

Syntax:
diag_activeSQFScripts
Return Value:
Array of Arrays - to format [[scriptName, fileName, isRunning, currentLine], ...]:
  • scriptName: String - Returns:
    • Script name set with scriptName
    • File name if script name is empty
    • <spawn> + first 100 characters if script name and file name are both empty
  • filePath: String - path of the parent script
  • isRunning: Boolean
  • currentLine: Number - line currently executing

Examples

Example 1:
0 spawn { hint str diag_activeSQFScripts; }; // displays [["<spawn> hint str diag_activeSQFScripts;", "", true, 1]]
Example 2:
0 spawn { hint str diag_activeSQFScripts; // displays [["<spawn> hint str diag_activeSQFScripts;", "", true, 2]] };
Example 3:
0 spawn { scriptName "aScript"; hint str diag_activeSQFScripts; // displays [["aScript", "", true, 3]] };

Additional Information

See also:
diag_log diag_fps diag_fpsmin diag_frameNo diag_tickTime diag_activeSQSScripts diag_activeMissionFSMs diag_activeScripts execVM spawn

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note