|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed May 19, 2010 12:22 am
Trying to add to a list |
I'm attempting to take the output below and put it into already existing variable list but I'm not having any luck.
Code: |
0 Creators:
22 Players: Acantha Falafel Huggy Ilde Inige Inskeme Karl Keita Kylmet Kyrnin Latanza Laule Nue Phagius Rolhan Shenandoah StYx Thakh Trqs Virga Viviene Zexium
22 Players, 22 Total |
What I'm trying to use is below.
Code: |
#trigger {* Players~: *} {priesttemp = %replace(%2," ", "|")} |
For some reason it's not capturing all the names. Any ideas? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed May 19, 2010 12:32 am |
First off, you aren't doing any capturing so there's nothing %1 or %2:
* -- match but don't capture
(*) -- match and capture
If you need to preserve whatever is in @priesttemp, then you need to use a different tactic. The %replace() function as you are using it will overwrite whatever was already in @priesttemp. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed May 19, 2010 12:44 am |
Ok I get that, but the replace doesn't seem to be working. It's fine that it'll replace it as all I want to do after I get the data into priesttemp is add it back to the main variable.
All I'm getting in @priesttemp atm is
Code: |
Acantha Cthulhu Dasnamenlose Falafel Huggy Ilde Inige Inskeme Kaedes Karl Keita Kylmet Kyrnin Latanza Laule Noelle Nue Phagius Rolhan Thakh Trqs Virga Zexium |
Which if I didn't royally duck up the replace it should have put the | where the spaces are should it not? |
|
|
|
Fewyn Wanderer
Joined: 27 Sep 2002 Posts: 83
|
Posted: Wed May 19, 2010 12:48 am |
Nevermind I'm a moron, I fixed it. Thanks Matt
|
|
|
|
|
|