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
Agroamar
Beginner


Joined: 09 Feb 2002
Posts: 10
Location: USA

PostPosted: Sun Feb 24, 2002 3:32 pm   

Question about Expanding Variables
 
Ok, I want to make a variable expand when written to a file, for instance


#FILE 1 "stuff.txt";
#WRITE 1 "blah ~[ ~[ @thing ~] ~] blah";
#CLOSE 1

But when I look at the file, The variable hasn't expanded, its just as is. Any help would be appreciated. Thanks.
Reply with quote
gyropump
Newbie


Joined: 07 Feb 2002
Posts: 6
Location: USA

PostPosted: Sun Feb 24, 2002 3:38 pm   
 
option 1 i can think of :

#FILE 1 "stuff.txt";
#WRITE 1 "blah ~[ ~[ %eval(@thing) ~] ~] blah";
#CLOSE 1

Option 2 :

#FILE 1 "stuff.txt";
#VA Templine "blah ~[ ~[ %eval(@thing) ~] ~] blah";
#WRITE 1 @Templine
#CLOSE 1

Option 3 : just noticed this one , perhaps it's because you're making it a part of a string

#FILE 1 "stuff.txt";
#WRITE 1 "blah ~[ ~[ "@thing" ~] ~] blah";
#CLOSE 1


hope they help



.*^*. If at first you dont succeed, your sky diving days are over .*^*.
Reply with quote
Agroamar
Beginner


Joined: 09 Feb 2002
Posts: 10
Location: USA

PostPosted: Sun Feb 24, 2002 3:42 pm   
 
Ah Nicely done! I tried the third option first, and it worked perfectly. Thank you very much gyropump!
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