Arma 3 Scripting

diag_stacktrace

  • Arma 3 v2.06

Command · Markdown · JSON · original wiki page

Description

Returns an array containing the function name, line number, scope name and all local variables in form of a hashmap.

Syntax

diag_stacktrace

Returns: Array of Arrays, in format:

params ["_functionName", "_lineNumber", "_scopeName", "_variablesHashmap"];

Examples

Example 1

private _testvar = 1;
private _testother = 2;
call
{
    _testvar = 3;
    if (_testvar == 3) then
    {
        _myVariable = 4;
        hint str diag_stacktrace;
    };
};
/*
[
    ["", 3, "", [["_this", []], ["_testother", 2], ["_testvar", 3]]],
    ["", 6, "", []],
    ["", 8, "", [["_myvariable", 4]]]
]
*/

See also

arma.RPT · diag_dumpCalltraceToLog · diag_log