![](templates/Classic/images/spacer.gif) |
braumen Beginner
Joined: 28 May 2002 Posts: 17 Location: USA
|
Posted: Wed May 29, 2002 3:46 am
one more variable ? |
i swear if i get this you wont hear from me on this subject for a while!
this is what i have so far a variable names ARENA
#addi arena "text" this adds a line of text to the variable
#addi arena "text2" this adds a second line of text to the variable
it shows up in the STW as text|text2
my question is how do i get them to show up like this:
text
text2 considering that two different triggers put each text line into the variable that is the big problem... i can do it with a single trigger, but when i use 2 seperate triggers, as the MUD demands, that is how it shows up
Thanks! |
|
|
![](templates/Classic/images/spacer.gif) |
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Wed May 29, 2002 4:42 am |
Ok, this was a bit more difficult. The best way I found was to add this to EVERY trigger that changes the variable. The reason is is you arent actually putting the variable into the status window, only the values. So any trigger or alias you have that adds or removes something from this you'll have to put this in at the end:
#STW "";#FORALL @test {#STW + %i}
It rests the status window to null, then for each item in the list it ADDs it to a new line.And yes, thats suppose to be %i. |
|
|
![](templates/Classic/images/spacer.gif) |
Vijilante SubAdmin
![](images/avatars/7230815434153eca6be3ad.gif)
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed May 29, 2002 11:11 am |
#STW {%replace(@arena,"|","%cr)}
StatusWindow is one of those commands that preforms no expansion of it arguements. However it does full expansion on each display call.
Dacheeba's method has far to much processing overhead to be useable. |
|
|
![](templates/Classic/images/spacer.gif) |
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Wed May 29, 2002 2:44 pm |
Hmmm, yeah, I tried to pull functions to do it straight from the #STW command, but I just couldnt do it. What really bites is the %cr is nowhere in my help files*boggle*. I was trying with %nltocr and all sorts of silliness. Ah well.
Btw, you have one " too many in your example.
#STW {%replace(@arena,"|",%cr)}
Thats better :P |
|
|
![](templates/Classic/images/spacer.gif) |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed May 29, 2002 4:20 pm |
For future reference:
%cr is in the helpfiles. It's the third one down in the list of Predefined Variables.
Hard to find if you don't know where to look.
LightBulb
Vague questions get vague answers ![](icon_smile_big.gif) |
|
|
![](templates/Classic/images/spacer.gif) |
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Wed May 29, 2002 4:53 pm |
Yeah, I limited my search to the Function Reference and function wizard. It isnt on either of those. But it does show up on the index, but like ya said, its hard to search for something if you dont know what it is
Ok, maybe you didnt say that, but it is hard, heh |
|
|
![](templates/Classic/images/spacer.gif) |
braumen Beginner
Joined: 28 May 2002 Posts: 17 Location: USA
|
Posted: Thu May 30, 2002 1:08 am |
just q quick ?
is it possible to replace values using:
#stw {%replace(@arena, "text1","text2")}? |
|
|
![](templates/Classic/images/spacer.gif) |
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Thu May 30, 2002 2:56 am |
quote:
just q quick ?
is it possible to replace values using:
#stw {%replace(@arena, "text1","text2")}?
Why do ya try it and find out? :P
But yeah you could do that, but it isnt a logical #STW function. You might want %replace somewhere in your triggers/aliases, but really the only thing to use it in your status window is to remove the '|' and add a new line in its place.Also, the script you used would replace the value 'text1' with 'text2' so the new value of @arena would be 'text2|text2'. Gotta watch your logic, and dont be timid to play around with it :) |
|
|
![](templates/Classic/images/spacer.gif) |
|
|