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


Joined: 27 Jun 2001
Posts: 82

PostPosted: Wed Jan 02, 2002 11:40 pm   

Logging help
 
Okay, here's what I wanna do. I want to have a button that toggles logging on or off, and each time it starts logging, it increments the number in the filename. Ex. (file1.txt, file2.txt, file3.txt)

The button should be no problem, but how can I increment the filenames? Any ideas?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 03, 2002 12:19 am   
 
quote:

Okay, here's what I wanna do. I want to have a button that toggles logging on or off, and each time it starts logging, it increments the number in the filename. Ex. (file1.txt, file2.txt, file3.txt)

The button should be no problem, but how can I increment the filenames? Any ideas?



Use a variable:).

#VARIABLE FileNum 1 "1"

In the button code, do something like this:
#ADD FileNum 1
#LOG "File"@FileNum"

li'l shmoe of Dragon's Gate MUD
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Thu Jan 03, 2002 1:12 am   
 
I had an idea of using a variable... but can you concatenate them like that? Like, stick a variable on the end of a string?
Reply with quote
undergod
Wanderer


Joined: 27 Jun 2001
Posts: 82

PostPosted: Thu Jan 03, 2002 4:27 am   
 
nevermind, I'm stupid, I found the %concat function... w00t
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