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


Joined: 04 Dec 2000
Posts: 16
Location: USA

PostPosted: Thu Jan 29, 2004 12:04 am   

Loading string list from file
 
I am trying to load a string list variable from a text file. The file has one name on each line. I have tried working with #additem and %grep but cannot get anything to populate the variable. Thanks in advance.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 29, 2004 4:08 am   
 
%read() would probably be more useful.
Reply with quote
Dargo
Beginner


Joined: 04 Dec 2000
Posts: 16
Location: USA

PostPosted: Sat Jan 31, 2004 7:58 am   
 
For anyone that is interested, this is what I got to work. I have a file with about 100 line items to load.

#FILE 1 myfile.txt
#LOOP 1,%filesize( 1) {#ADDITEM myvariable {%read( 1, 0)}}
#CLOSE 1
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