logfile write puts one line into the target with that name, exactly as written: no time, no level, and
whatever the levels are. It is how a script writes a plain text file, such as settings it reads back with
call. logfile write output text writes to the Output panel, as log text does.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
name |
A target opened with logfile open, or output. |
text |
Optional. Everything after the name, with variables replaced by their values and the words joined by one space, as log reads them. Without it, an empty line. |
Example
Section titled “Example”A configuration of set lines, saved and loaded back:
set %bandages 50set %home Britain_Banklogfile open cfg medic , #CharID , .txt newlogfile write cfg #smc , Settings of #CharNamelogfile write cfg set % , bandages %bandageslogfile write cfg set % , home %homelogfile close cfgcall medic , #CharID , .txt ; sets %bandages and %home againhaltDetails
Section titled “Details”% , bandagesglues%andbandagesafter the variables are replaced, so the file gets the name%bandages; the next%bandagesgets its value. Numbered names work the same way:set % , x , %i , #spc , %x . %iwritesset %x3 1234.- A word starting with
;ends the script line, so a comment line is written with#Smc:#smc , text. $,>,|,&,^and%are written as they are.- In a settings file, a value must be one word:
callreadsset %name Dr WhoasDr. Keeping data between runs compares settings files with*variables andSQL.