<Var/Number> = The 'page id' of the XML text file to use.
<Var/Number> = The text entry number, 't id' from the XML file.
<Value1 - 5> = The value(s) to be inserted into your message.
Formats and writes a message to the player's logbook.
The format string is read from an XML language file as per the sprintf: pageid instruction.
If a <Value> is not going to be used or needed, it needs to be set to null.
Example of your XML text file; ((<language id="44">) Denotes English)
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?> <language id="44"> <page id="9999" title="My Text File"> <t id="100">Your Station, %s, in sector %s, has %scr in its account.</t> </page> </language>
$station.credits = $station get money
$station.credits.string = convert number $station.credits to string
$station.name = $station get name
$station.sector = $station get sector
write to player logbook: prinf: pageid = 9999 textid = 100, $station.name, $station.sector, $station.credits.string, null, null
Each time %s is encountered, the corresponding <Value> is inserted into the message and the the compiled message is printed to the player logbook.
The resulting message may look something like this,
'Your Station, Your Solar Power Plant XL alpha, in sector The Wall, has 2,343,548cr in its account.'
- »» Logbook Commands
- write to player logbook: printf: pageid=<Var/Number> textid=<Var/Number>, <Value>, <Value>, <Value>, <Value>, <Value>