diag scope: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{DISPLAYTITLE:diag_scope}}
{{DISPLAYTITLE:diag_scope}}
{{Command|Comments=
{{Command


| arma3dev |Game name=
| arma3dev


|2.01|Game version=
|2.01


|gr1= Diagnosis |GROUP1=
|gr1= Diagnosis


|gr2= Performance Logging|GROUP2=
|gr2= Performance Logging


| 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=
| 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.


| '''diag_scope''' |SYNTAX=
| '''diag_scope'''


|p1= |PARAMETER1=  
|p1=


|p2= |PARAMETER2=  
|p2=


|p3= |PARAMETER3=  
|p3=


| [[Number]] |RETURNVALUE=
| [[Number]]




Line 41: Line 41:
};
};
};
};
};</code>|EXAMPLE1=
};</code>




| [[exitWith]], [[diag_fps]], [[diag_fpsMin]], [[diag_frameNo]], [[diag_log]], [[diag_tickTime]], [[diag_deltaTime]] |SEEALSO=
| [[exitWith]], [[diag_fps]], [[diag_fpsMin]], [[diag_frameNo]], [[diag_log]], [[diag_tickTime]], [[diag_deltaTime]]


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  

Revision as of 00:27, 18 January 2021


-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 2.01|2.01]]
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:
DiagnosisPerformance Logging

Syntax

Syntax:
diag_scope
Return Value:
Number

Examples

Example 1:
[] spawn { systemChat str diag_scope; // 0 call { call { systemChat str diag_scope; // 2 isNil { systemChat str diag_scope; // 0 call { systemChat str diag_scope; // 1 }; }; }; }; };

Additional Information

See also:
exitWithdiag_fpsdiag_fpsMindiag_frameNodiag_logdiag_tickTimediag_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

[[Category:Introduced with arma3dev version 2.01]][[ Category: arma3dev: New Scripting Commands | DIAG SCOPE]][[ Category: arma3dev: Scripting Commands | DIAG SCOPE]]

Notes

Bottom Section