BIS fnc logFormat: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Created page with "<syntaxhighlight lang=javascript>/* Author: Karel Moricky Description: Display debug message Parameter(s): _this select 0: STRING - Formatted message or first param _this...")
(Now has the correct layout.)
Line 1: Line 1:
<syntaxhighlight lang=javascript>/*
{{Function|= Comments
Author: Karel Moricky
____________________________________________________________________________________________


Description:
| arma3 |= Game name
Display debug message


Parameter(s):
|1.00|= Game version
_this select 0: STRING - Formatted message or first param
_this select n (Optional): ANY - additional parameters


Returns:
____________________________________________________________________________________________
BOOL - true when done
*/


private["_omit"];
| Display debug message. |= Description
____________________________________________________________________________________________


if (isNil "_fnc_log_disable") then
| [Text, <Parameters>] call [[BIS_fnc_logFormat]]; |= Syntax
{
_omit = false;
}
else
{
_omit = _fnc_log_disable;
};


if (_omit) exitWith {false};
|p1= '''Text''': [[String]] - Formatted message or first param |=
|p2= '''Parameters''': [[Any Value]] - Optional, additional parameters |=


private ["_scriptName","_text"];


//--- Insert function name where available
| [[Boolean]] - [[true]] when done |= Return value
_scriptName = if (isnil "_fnc_scriptName"/* || isnil "_fnc_scriptNameParent"*/) then {
____________________________________________________________________________________________
""
 
} else {
|x1= <code>["my message goes here"] [[call]] [[BIS_fnc_logFormat]];</code> |=
_fnc_scriptName
};
_scriptName = if (_scriptName != "") then {" [" + _scriptName + "] "} else {" "};


____________________________________________________________________________________________


//--- Display
| |= See also
if (typename _this != typename []) then {_this = [_this]};
if (count _this == 0) then {_this = ["<EMPTY ARRAY>"]};
_text = _this select 0;
if (typename _text != typename "") then {_text = str _this;};
_thisLocal = +_this;
_thisLocal set [0,profilename + "/BIS_fnc_log:" + _scriptName + _text];


if (getnumber (missionconfigfile >> "allowFunctionsLog") > 0 || cheatsEnabled) then {
}}
diag_log format _thisLocal
};


true
<h3 style="display:none">Notes</h3>
</syntaxhighlight>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Arma 3:_Functions|logFormat]]

Revision as of 13:56, 2 May 2014

Hover & click on the images for description

Description

Description:
Display debug message.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[Text, <Parameters>] call BIS_fnc_logFormat;
Parameters:
Text: String - Formatted message or first param
Parameters: Any Value - Optional, additional parameters
Return Value:
Boolean - true when done

Examples

Example 1:
["my message goes here"] call BIS_fnc_logFormat;

Additional Information

See also:
See also needed

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

Notes

Bottom Section