Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
gth
Beginner


Joined: 17 Oct 2003
Posts: 19
Location: Australia

PostPosted: Fri Jan 04, 2008 8:02 am   

#WRITE {6} results in garbage?
 
My intention is to use #WRITE to output to files in such a way that won't add CRLF. From the help entry for #FILE it seems as though file numbers 1-5 are text mode and I believe file numbers 6-10 are more binary-like in their I/O operations. However firing this alias -
Code:
#ALIAS test {#FILE 6 testme.txt;#WRITE {6} {Test};#CLOSE 6}

...produces this in the output file testme.txt -
Code:
                                                                                                                                                                                                                                                                Testm(@ A@ @m׈ ߈                                                         $   %           A~A~    <3Tw|h|4    %@ 8 %@    Ϫ    Ϫ@     UJ mUJ "UJ m   mL,N ,N            


The file doesn't exist prior to firing the alias; I'm running 7.21 on WinXP with latest patches applied. If this is a known bug or if #WRITE with file number 6 isn't going to work the way I expect, I don't mind using VBScript to write to a file provided vbscript can access the zMUD variables it needs to produce the file output.

Thanks,
G.
Reply with quote
gth
Beginner


Joined: 17 Oct 2003
Posts: 19
Location: Australia

PostPosted: Fri Jan 04, 2008 9:31 am   
 
Okay, from searching around here a bit further, I see files 6-10 are for reading and writing structures (any detailed info on how the latter works??).

Back on topic though: is there a quick sample of writing to a file that won't add the carriage-return and line-feed? (via #MSS if necessary).


Thanks,
G.
_________________
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Jan 04, 2008 3:45 pm   
 
See the help for #write for more info on writing into files 6-10. Basically, #write 6 "hello world" 1;#write 6 "hello fang" 10 creates the first and tenth records, which are then read with #read 6 1;#read 6 10.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net