|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Mon Feb 13, 2006 5:48 am
MXP in status window with string lists |
Okay, having a bit of trouble trying to figure this out. I have a stringlist made, and I have it expanded in the status window. What I want to do is individually be able to click on each item and have it correspond with the MUD. I've heard it's possible and people have done it, so I'm not sure how. For example, I have a string list with available targets in it, so I want to be able to click each target, and set my target variable to that. The problem is I don't know how to get the value of the item I click on without being able to use commands like #forall.
This is what I have so far:
<send>%expandlist( @targets, </send>%cr<send>)</send>
Zmud says the code has errors, but it works so far as to send the name of the item to the MUD because <send> default sends what is clicked on if nothing else is specified. However if I change it to set a variable, I lose the ability to specify what was clicked. Any ideas? |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Feb 13, 2006 5:41 pm |
You usually get unwarranted errors from the syntax parser when using <> in your code. It's a problem with both MXP and <> expansion. Putting ~ in front of all < usually makes the problem go away with no adverse side effects.
|
|
|
|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Mon Feb 13, 2006 5:43 pm |
Ya, problem is for some reason if I use ~ in front of them, which I originally did, it shows up in the status window.
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Feb 13, 2006 5:53 pm |
There's almost always a way around these things. Could you expand it with %subregex instead and include the entire pattern somehow?
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Mon Feb 13, 2006 6:03 pm |
I got this in my status bar maybe it will help you?
Exits: %subregex(%expandlist(%roomexit(),", "),"(\a+(?: \a+)+|\a\a+)",~<send~>%1~</send~>) |
|
|
|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Mon Feb 13, 2006 9:29 pm |
Ahh, that worked! Thanks so much!
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
|
|
|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Tue Feb 14, 2006 10:28 pm |
I have that same problem too, with it taking a few clicks before it actually works.
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Feb 15, 2006 2:01 pm |
Yeah, thats why i put "kinda" in the topic ;-)
Never got a work around on it make it work the 1st time.
Sometimes it does, sometimes it takes 2, at times can take 3 :-)
I just click several times in a row now. like a triple click and it goes thru.
Ya get used to it.
But at least it's better than nothing ;-) |
|
|
|
|
|