BIS fnc logFormatServer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Function|= Comments " to "{{Function|Comments= ")
(Page filling)
Line 5: Line 5:
|1.00|Game version=
|1.00|Game version=


<!---|arg= local |Multiplayer Arguments=--->
| Logs (using [[diag_log]]) a debug message ([[profileName]], [[getPlayerUID|playerUID]], [[Magic Variables#fnc_scriptName|_fnc_scriptName]], provided text) to '''server'''<nowiki/>'s [[Crash Files|.RPT]]. In singleplayer, [[BIS_fnc_logFormat]] is used.
{{Informative | [[Description.ext#allowFunctionsLog|allowFunctionsLog]] must be enabled.}} |Description=


<!---|eff= local |Multiplayer Effects=--->
| [text, argument1, argument2, ...] call [[BIS_fnc_logFormatServer]] |Syntax=


| <pre>/*
|p1= text: [[String]] or [[Anything]] - text using [[format]] standard (with %). Any non-[[String]] value will be converted (with [[str]]) |Parameter 1=
Author: Karel Moricky


Description:
|p2= argument1..n: [[Anything]] - same as [[format]] arguments - referenced in ''text'' as %1, %2 etc
Display debug message


Parameter(s):
| [[Boolean]] - [[true]] when done |Return value=
_this select 0: STRING - Formatted message or first param
_this select n (Optional): ANY - additional parameters


Returns:
|x1= <code>[[private]] _currentFPS = [[diag_fps]];
BOOL - true when done
[[if]] (_currentFPS < 10) [[then]]
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=
{
["Player %1 has performance issues (%2 FPS)", [[name]] [[player]], _currentFPS] [[call]] [[BIS_fnc_logFormatServer]];
};</code> |Example 1=


|[] call [[BIS_fnc_logFormatServer]]|Syntax=
| [[diag_log]] [[BIS_fnc_log]] [[BIS_fnc_logFormat]] |See also=
 
|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
 
|Datatype - description|Return value=
 
|x1= <code></code>|Example 1=
 
| |See also=
}}
}}


[[Category:Function Group: Debug|{{uc:logFormatServer}}]]
[[Category:Function Group: Debug|{{uc:logFormatServer}}]]
[[Category:Functions|{{uc:logFormatServer}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:logFormatServer}}]]

Revision as of 16:52, 26 June 2020

Hover & click on the images for description

Description

Description:
Logs (using diag_log) a debug message (profileName, playerUID, _fnc_scriptName, provided text) to server's .RPT. In singleplayer, BIS_fnc_logFormat is used.
allowFunctionsLog must be enabled.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[text, argument1, argument2, ...] call BIS_fnc_logFormatServer
Parameters:
text: String or Anything - text using format standard (with %). Any non-String value will be converted (with str)
argument1..n: Anything - same as format arguments - referenced in text as %1, %2 etc
Return Value:
Boolean - true when done

Examples

Example 1:
private _currentFPS = diag_fps; if (_currentFPS < 10) then { ["Player %1 has performance issues (%2 FPS)", name player, _currentFPS] call BIS_fnc_logFormatServer; };

Additional Information

See also:
diag_log BIS_fnc_log BIS_fnc_logFormat

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