writefield
- Last UpdatedNov 05, 2023
- 2 minute read
The writefield statement enables you to write a field (usually an MSTRING, DSTRING or an SJSON) into a text file. This command works together with readfield command.
Note: The path of the file is local to the engine executable.
Platform support
This node is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-Portable WASM platforms.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
Full support |
Full support |
Full support |
Full support |
|
|
|
|
|
|
Code example
This is a code example for the writefield statement.
<command name="showmenu">
<writefield field="dict.value" file="lastuser.txt"/>
<!-- ... -->
</command>
Fields
These are the fields for writefield statement.
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
field |
sstring |
Mandatory |
No default value |
The name of the field. |
|
file |
sstring |
Mandatory |
No default value |
The destination file path. |