Difference between revisions of "diag scope"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Some wiki formatting)
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:diag_scope}}
+
{{RV|type=command
{{Command|Comments=
 
  
| arma3dev |Game name=
+
|game1= arma3
 +
|version1= 2.02
  
|2.01|Game version=
+
|gr1= Diagnostic
  
|gr1= Diagnosis |GROUP1=
+
|gr2= Performance Profiling
  
|gr2= Performance Logging|GROUP2=
+
|descr= Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0.
 +
The examples of such execution are event handlers, [[spawn]], etc. [[isNil]] [[Code]] will also create a parent scope.
 +
Any use of [[call]] and such will stack execution creating child scopes and increasing scope depth.
  
| Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0. The examples of such execution are event handlers, [[spawn]], etc. [[isNil]] [[Code]] will also create a parent scope. Any use of [[call]] and such will stack execution creating child scopes and increasing scope depth. |DESCRIPTION=
+
|s1= [[diag_scope]]
  
| '''diag_scope''' |SYNTAX=
+
|r1= [[Number]]
  
|p1= |PARAMETER1=
+
|x1= <sqf>
 
+
[] spawn
|p2= |PARAMETER2=
 
 
 
|p3= |PARAMETER3=
 
 
 
| [[Number]] |RETURNVALUE=
 
 
 
 
 
|x1= <code>[] [[spawn]]
 
 
{  
 
{  
[[systemChat]] [[str]] [[diag_scope]]; // 0
+
systemChat str diag_scope; // 0
[[call]]
+
call  
 
{  
 
{  
[[call]]
+
call
 
{  
 
{  
[[systemChat]] [[str]] [[diag_scope]]; // 2
+
systemChat str diag_scope; // 2
[[isNil]]
+
isNil  
 
{  
 
{  
[[systemChat]] [[str]] [[diag_scope]]; // 0
+
systemChat str diag_scope; // 0
[[call]]
+
call  
 
{
 
{
[[systemChat]] [[str]] [[diag_scope]]; // 1
+
systemChat str diag_scope; // 1
 
};
 
};
 
};
 
};
 
};
 
};
 
};
 
};
};</code>|EXAMPLE1=
+
};
 
+
</sqf>
 
 
| [[exitWith]], [[diag_fps]], [[diag_fpsMin]], [[diag_frameNo]], [[diag_log]], [[diag_tickTime]], [[diag_deltaTime]] |SEEALSO=
 
  
| |MPBEHAVIOUR=  
+
|seealso= [[exitWith]] [[diag_fps]] [[diag_fpsMin]] [[diag_frameNo]] [[diag_log]] [[diag_tickTime]] [[diag_deltaTime]]
 
}}
 
}}
 
<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:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
 
{{GameCategory|arma2|Scripting Commands}}
 
{{GameCategory|arma3|Scripting Commands}}
 
{{GameCategory|tkoh|Scripting Commands}}
 
 
<!-- CONTINUE Notes -->
 
<!-- DISCONTINUE Notes -->
 

Latest revision as of 14:44, 5 May 2022

Hover & click on the images for description

Description

Description:
Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0. The examples of such execution are event handlers, spawn, etc. isNil Code will also create a parent scope. Any use of call and such will stack execution creating child scopes and increasing scope depth.
Groups:
DiagnosticPerformance Profiling

Syntax

Syntax:
diag_scope
Return Value:
Number

Examples

Example 1:

Additional Information

See also:
exitWith diag_fps diag_fpsMin diag_frameNo diag_log diag_tickTime diag_deltaTime

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