format: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|FORMAT]]
[[Category:Scripting Commands|FORMAT]]
[[Category:Scripting Commands OFP 1.97|FORMAT]]
[[Category:Scripting Commands OFP 1.96|FORMAT]]
[[Category:Scripting Commands OFP 1.46|FORMAT]]
[[Category:Scripting Commands OFP 1.46|FORMAT]]
[[Category:Scripting Commands ArmA|FORMAT]]
[[Category:Scripting Commands ArmA|FORMAT]]

Revision as of 21:21, 1 June 2006


format format


Operand types:

format: Array

Type of returned value:

String

Description:

First argument of array is the format string.

Format string may contain references to following arguments in form %1, %2, etc.

Each %x is replaced by the corresponding argument.

%x may appear in the format string in any order.

\n makes a new line.


Examples:

format ["%1 - %2 - %1", 1, "text"] ...... Result is "1 - text - 1"

hint format ["%1", loon1 distance Tank1]

titleText [format ["Good morning, Captain %1.", name player], "plain", 1]