ID:175312
May 10 2003, 4:33 pm
|
|
Is there a way towhere I can orginize names and such in a list var? In the form of a verb*
|
May 10 2003, 11:46 pm
|
|
Im not sure what you mean. Are you after a way of sorting lists?
|
In response to DarkView
|
|
Hmm *thinks of a way to explain*
var/list/names = list() mob/verb/addname(T as text) names += T -Now lets say the user uses this verb o so many times. Lets say the names Jake,Jack,John, and James are in there. Now Im wanting to make a verb so that the user can rearragen the names in the list lets say.. James first Jake Second Jack third and John last.. More like an orginzation thing im needing... But have No clue what to do. |
In response to Jacob
|
|
What you'll want to do is make two lists. One (A) has a copy of the original list (O), and one is empty (B).
Now you'll want to move the vars from the A list over too the B list. How you do that depends on your interface, but for arguments sake we'll just say you use a input(). Now remember to take the var out of the A list when you put it in the B list or else you'll give the player a chance to add the same thing over and over again. Then when they are all moved over (The A list will be empty), copy the B over too the O list. I hope that wasnt too confusing for you... Sorry if it was. |
In response to Jacob
|
|
Here's a library with a bunch of sorting routines:
http://developer.byond.com/hub/AbyssDragon/SortProcs |