<RetVar> = The variable that stores the formatted string.
<Var/String> = The format for the string.
<Value> = The values to be inserted into the string format.
Formats a string according the format specifier in <Var/String>.
This derives from the 'C' language standard library function by the same name.
The format string can contain from one to five “%s” symbols.
Each time a %s is encountered, it is replaced with the corresponding <Value>.
Example:
$Message = sprintf: fmt='You flying the ship %s in sector %s.', [playership], [sector], null, null, null
The above will store the string 'You are flying the ship <shipname> in sector <sector>' in the variable $Message.
Command Location:
- »» General Commands
<RetVar> = sprintf: fmt = <Var/String>, <Value>, <Value>, <Value>, <Value>, <Value>