{"name":"formatText","operator":null,"title":"formatText","type":"command","url":"https://community.bistudio.com/wiki/formatText","revid":351276,"updated":"2023-11-27T02:21:39Z","groups":["Strings","Structured Text"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Creates a Structured Text similar to format command.","syntaxes":[{"syntax":"formatText [format, argument1, argument2, ...]","since":null,"effect":null,"exec":null,"params":[{"name":"format","type":"String","optional":false,"default":null,"description":"a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc.","types":["String"],"since":null,"text":"format: String - a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc."},{"name":"argumentN","type":"Anything","optional":false,"default":null,"description":"use Structured Text where necessary (see Example 2)","types":["Anything"],"since":null,"text":"argumentN: Anything - use Structured Text where necessary (see Example 2)"}],"returns":{"type":"Structured Text","types":["Structured Text"],"description":null,"text":"Structured Text"},"form":"unary","operator":null,"left":null,"right":{"text":"[format, argument1, argument2, ...]","types":["Array"]}}],"examples":[{"text":"```sqf\nhint formatText [\"Image: %1\", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"];\n```","code":["hint formatText [\"Image: %1\", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"];"]},{"text":"```sqf\nhint formatText [\"%1%2%3\", \"line1\", \"<br/>\", \"line2\"];        // result displayed in one line\nhint formatText [\"%1%2%3\", \"line1\", lineBreak, \"line2\"];    // result displayed in two lines\n```","code":["hint formatText [\"%1%2%3\", \"line1\", \"<br/>\", \"line2\"];\t\t// result displayed in one line\nhint formatText [\"%1%2%3\", \"line1\", lineBreak, \"line2\"];\t// result displayed in two lines"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Structured Text","format","composeText","text","parseText"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Strings","Command Group: Structured Text","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}