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
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sat Dec 22, 2001 4:54 am   

Going through entire list of variables.
 
Say I want to make a name generator.. I saw the post on how to read a text file and store it as a variable.. very helpful BTW.. how would I make it to where after I told someone a name.. it would go to the next name.. and so on and so on for like a list of a hundred or so names?

For tomarrow is another day, and other days come but 6 times a week.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Sat Dec 22, 2001 5:26 am   
 
You can keep track of what number name you're on:


#TR {%w sez, "Gimme a name"} {
say %item(@BigListOfNames, @counter)
#ADD counter 1
}


or you can delete the name you've just given out:



#TR {%w sez, "Gimme a name"} {
say %item(@BigListOfNames, 1)
#DELNITEM BigListOfNames 1
}



Troubadour
Reply with quote
PrestoPimp
Apprentice


Joined: 18 Sep 2001
Posts: 175
Location: USA

PostPosted: Sat Dec 22, 2001 6:09 am   
 
I have this for the loading of the charname file..


#TR {*Alas ... you have entered the*} {#FILE 1 Charnames.txt
#LOOP 1, %filesize(1) {#ADDITEM namelist %read(1, %i)}
#CLOSE 1}

But it isnt loading the entire txt file into the variable.. just one name.. any ideas?



For tomarrow is another day, and other days come but 6 times a week.
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