diag activeSQFScripts: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(52 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:diag_activeSQFScripts}}
{{RV|type=command
{{Command|= Comments
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.44


|1.44|= Game version
|gr1= Diagnostic
____________________________________________________________________________________________


| Returns an array containing all currently active SQF scripts/functions. |= Description
|descr= Returns information about active [[SQF Syntax|SQF]] scripts. To see number of all scripts currently in the scheduler use [[diag_activeScripts]].
____________________________________________________________________________________________


| '''diag_activeSQFScripts''' |= Syntax
|s1= [[diag_activeSQFScripts]]


|r1= [[Array]] of [[Array]]s - to format [<nowiki/>[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


| [script1, script2, script2,...]: [[Array]] <br/><br/>
|x1= <sqf>0 spawn { hint str diag_activeSQFScripts; }; // displays [["<spawn> hint str diag_activeSQFScripts;", "", true, 1]]</sqf>
Each script entry is an array itself with the following entries:<br/>
[function- or filename, filename, unknown boolean, current line]|= RETURNVALUE


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


|x1= <code>{[[systemChat]] [[str]] _x} foreach diag_activeSQFScripts;</code>|= Example 1
|x3= <sqf>
0 spawn {
scriptName "aScript";
hint str diag_activeSQFScripts; // displays [<nowiki/>["aScript", "", true, 3]]
};
</sqf>


____________________________________________________________________________________________
|seealso= [[diag_log]] [[diag_fps]] [[diag_fpsmin]] [[diag_frameNo]] [[diag_tickTime]] [[diag_activeSQSScripts]] [[diag_activeMissionFSMs]] [[diag_activeScripts]] [[execVM]] [[spawn]]
 
| [[diag_log]], [[diag_fps]], [[diag_fpsmin]], [[diag_frameno]], [[diag_tickTime]] |= SEEALSO
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on May 5, 2015 - 16:44 (UTC)</dd>
<dt class="note">[[User:Will|Will]]</dt>
<dd class="note">
return array with arrays... example -> <nowiki>[["life_fnc_test","",true,1]]</nowiki> ... first is the name of the function but the rest?!?
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 20: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