ID:159074
 
I know you can export a savefile var using NEW. But I was wondering how you could export a var as a .txt file, because when you write a savefile it is a .SAV file so I cannot read it. I am trying to do this to implement a system that lets me read reasons people are being banned and review it.

Example (Non-working):
mob
//...
var
review = new("/bans/[M.key]")
Write(review)


But it says the var "review" is an unknown var type...any help?

Thanks!
-Hi1
text2file()

Also, you can't call a proc (Write(review)) in a variable declaration. It's something that can only happen at runtime (when the program has been booted up). In a way, I don't see how your code would ever work at all like that :o
In response to Mysame
Exactly why it says: Non-working

;)
Hi1 wrote:
I know you can export a savefile var using NEW. But I was wondering how you could export a var as a .txt file, because when you write a savefile it is a .SAV file so I cannot read it. I am trying to do this to implement a system that lets me read reasons people are being banned and review it.

var/Test="Testing testing 3 2 1"
mob/verb/ToText()
var/T=file("VarTest.txt")
T<<Test



Thanks!
-Hi1
You're welcome.