Menu

Pulling positional vars into a list

2020-09-17
2020-09-17
  • Michael Wray

    Michael Wray - 2020-09-17

    I'm using Susan's Lists, and I have a use case that looks like this:

    /def select = \
        /set select_targ = %{1} %;\
        /if ({#} >= 2) %;\
                /for i 2 {#} \
                /remlist selectiontypes -a %;\
                /addlist selectiontypes %%{i} %;\
        /endif
    

    My thing does a bit more that's MUD specific so I've excluded. Here's my problem - I keep ending up with the selectiontypes list containing 2|3|4 (etc) instead of, say, "/select names joe bob mary" resulting in joe|bob|mary as vars. I know I"m doing something obvious wrong but I cannot figure out what. Help please!

     

    Last edit: Michael Wray 2020-09-17
  • Michael Wray

    Michael Wray - 2020-09-17

    I also tried in a /while loop and am running into the same issue.

     

Log in to post a comment.