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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Thu Dec 06, 2007 8:55 pm   

[2.15] #write doesnt write
 
Ok, so after originally posting this, I did a bit more messin around and it doesn't appear #write is not working
I made the code Code:
Code:
#file 2 wrtitingtestfile.txt
#write 2 {crapola it worked}
#close 2
under an alias called writetest, ran it and nothing happened. Could be that I have the syntax wrong, but I can't use the help system to check it. I did however check the online help and it appears I have the syntax correct. I'm using Vista Ultimate.
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Fri Dec 07, 2007 1:25 am   
 
It looks correct to me as well.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Fri Dec 07, 2007 1:45 am   
 
It is possible this is a matter of trying use a directory you don't have access to on the #FILE command. Is your user set with Admin priveledges? Have you tried to specify another directory in the #FILE command?

I seem to recall Zugg mentioning somewhere that he adjusted the default directory for some file creation. If the "writingtestfile.txt" exists no where on your system then that indicates it was never created and the problem is with #FILE. I would suggest trying to run as Admin and seeing where the file ends up. It is likely that the default path is not quite right for the #FILE command.

Sorry it took so long for me to think about it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Fri Dec 07, 2007 1:48 am   
 
I ran it as admin. I've been running 1.34 and it's been creating/modifying files in this directory prior to 2.15, so it looks like that is out as a cause. Also I've searched my hard drive and it doesn't show up anywhere...
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Dec 07, 2007 8:19 am   
 
I'm running XP and it worked like a charm for me.

I got this output to the screen.
Code:
Opened wrtitingtestfile.txt as file 2
Closed C:\Documents and Settings\Administrator\My Documents\My Games\CMUD\wrtitingtestfile.txt on file 2


What directory did you specify for you data directory? Remember because of Vista permissions you have to your data directory under My Documents or install CMUD in a directory outside of Program Files, e.g. "C:\CMUD215".
_________________
Asati di tempari!
Reply with quote
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Fri Dec 07, 2007 2:23 pm   
 
hmm that might be the problem. But it still doesnt make sense.
I'm under the impression that writing a file could only be done in the same directory as CMUD? I've tried in the past to write to other directory and havn't had success. and the help file for #file says
Quote:
The filename given in name is restricted to the current directory containing CMUD.EXE and cannot refer to a EXE, HLP, or MUD file. This protects you from accidentally modifying important files on your disk.

Second, I've been writing files in this same directory with 1.34, without an issue, so something must have changed with my upgrade to 2.15.

I forgot about the outputs... I have those gaged right now, I'll ungag them and check it out.
Thanks for the replies!!!
Reply with quote
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Fri Dec 07, 2007 2:49 pm   
 
so i just changed my test alias to
Code:
#file 2 C:\Users\Administrator\Documents\writingtestfile.txt
#write 2 {crapola it worked}
#close 2

and ungagged the output notifications. the output said it opened the file and
Quote:
Closed C:\Users\Administrator\Documents\My Games\CMUD\FoxMud\writingtestfile.txt on file 2

I checked this spot and it wrote. Soo it looks like it is now working. But it appended the "my games\cmud\foxmud\" to the path.
I think the help file needs to be updated with the notion it will append the my games part to the directory, and that one can't write to the cmud program files directory.
I have a bunch of work to do as I have quite a few scripts setup to write and read from the programs directory not to mention some ftp scripts.
Thanks for the help.
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Fri Dec 07, 2007 5:16 pm   
 
Quote:
v. 2.13
The #FILE command now creates files within the character subfolder (the folder that contains the primary package file) by default.

Source: http://www.zuggsoft.com/page.php?file=cmud/version.htm
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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