BIS fnc logFormatServer: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Diagnostic | |gr1 = Diagnostic | ||
| 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. | | 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.}} | {{Informative | [[Description.ext#allowFunctionsLog|allowFunctionsLog]] must be enabled.}} | ||
| [text, argument1, argument2, ...] call [[BIS_fnc_logFormatServer]] | | [text, argument1, argument2, ...] call [[BIS_fnc_logFormatServer]] | ||
|p1= text: [[String]] or [[Anything]] - text using [[format]] standard (with %). Any non-[[String]] value will be converted (with [[str]]) | |p1= text: [[String]] or [[Anything]] - text using [[format]] standard (with %). Any non-[[String]] value will be converted (with [[str]]) | ||
|p2= argument1..n: [[Anything]] - same as [[format]] arguments - referenced in ''text'' as %1, %2 etc | |p2= argument1..n: [[Anything]] - same as [[format]] arguments - referenced in ''text'' as %1, %2 etc | ||
| [[Boolean]] - [[true]] when done | | [[Boolean]] - [[true]] when done | ||
|x1= <code>[[private]] _currentFPS = [[diag_fps]]; | |x1= <code>[[private]] _currentFPS = [[diag_fps]]; | ||
Line 22: | Line 22: | ||
{ | { | ||
["Player %1 has performance issues (%2 FPS)", [[name]] [[player]], _currentFPS] [[call]] [[BIS_fnc_logFormatServer]]; | ["Player %1 has performance issues (%2 FPS)", [[name]] [[player]], _currentFPS] [[call]] [[BIS_fnc_logFormatServer]]; | ||
};</code> | };</code> | ||
| [[diag_log]] [[BIS_fnc_log]] [[BIS_fnc_logFormat]] | | [[diag_log]] [[BIS_fnc_log]] [[BIS_fnc_logFormat]] | ||
}} | }} |
Revision as of 23:10, 17 January 2021
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.
- Execution:
- call
- Groups:
- Diagnostic
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