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
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Mon Mar 17, 2008 11:13 pm   

zMUD forgets where to put files when using #file
 
I find that after leaving zMUD open for a while it randomly forgets that it's supposed to look for files in the program directory by default.
At first everything will be fine, and zMUD will check in the proper location for text files. But after a while of zMUD being open, I'll do #file 1 <filename> and then grep for things that are supposed to be in the file, and it'll come back with no return. Then I'll look in my Documents and Settings folder and see that zMUD has rather stupidly started reading and writing there instead of in the zMUD folder.
This isn't just my computer, either. It has happened to others as well.

Is there any known solution to this problem? It makes script distribution very difficult, since things are no longer newbie friendly if a person has to muck about searching their computer for files that are supposed to be in the zMUD folder.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Mar 18, 2008 2:46 am   
 
This is not ZMud's doing. The way Zugg built ZMud, he uses a lot of OS dependencies. One of those is that the save dialog uses the current working directory, which changes whenever certain file operations are performed (regardless of which application is performing them.)
_________________
EDIT: I didn't like my old signature
Reply with quote
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Tue Mar 18, 2008 3:12 am   
 
MattLofton wrote:
This is not ZMud's doing. The way Zugg built ZMud, he uses a lot of OS dependencies. One of those is that the save dialog uses the current working directory, which changes whenever certain file operations are performed (regardless of which application is performing them.)
That's pretty stupid in my opinion. And it is Zugg's fault if that's how it's "supposed to work".

Anyway, I found a solution through abuse of another bug (or possibly just a lying help file).

#file 1 %replace(%right(%session.zMUDFileName("textfile.txt",""),2),"\","/")
Does exactly what I need, since it always gets a full path and is dynamic for each user.

Oh, and that part of the #FILE help that says "The filename given in name is restricted to the current directory containing ZMUD.EXE" is a lie. You can write anywhere you want with the above formatting.
Doing #file 1 /monkey.txt puts a file called monkey.txt in the root directory of your harddrive.
Doing #file 1 "/Program Files/monkey.txt" puts a file called monkey.txt in your Program Files folder.
Oh, and the part that says "cannot refer to a EXE, HLP, or MUD file" is a lie too. You can have whatever file extension you want.
Protection indeed.
*sigh*
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