this is invalid:
:local data1 (" at: " elaborate script
by: FRANK MU/OZ") ;
elaborate script ????
also put the script inside code blocks
What mean:
"and I want it to save a .TXT file to file" ???
At the end of this:
{
:local a "court"
:local data1 "do not write random text and call it script"
/file
print file="$a"
set $a contents=$data1
}
the file court.txt is created.
And for do something better, if the file must persist on reboot, this create the file inside flash disk on Flash devices without modifing the script when used on NAND devices.
{
:local a "court"
:if ([:len [/file find where name="flash" and type="disk"]]=1) do={:set a "flash/$a"}
:local data1 "do not write random text and call it script"
/file
print file="$a"
set $a contents=$data1
}