Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
DustyShouri
Novice


Joined: 29 Oct 2004
Posts: 34

PostPosted: 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?
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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.
Reply with quote
DustyShouri
Novice


Joined: 29 Oct 2004
Posts: 34

PostPosted: 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.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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?
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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~>)
_________________
http://www.Aardwolf.com
Reply with quote
DustyShouri
Novice


Joined: 29 Oct 2004
Posts: 34

PostPosted: Mon Feb 13, 2006 9:29 pm   
 
Ahh, that worked! Thanks so much!
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Feb 14, 2006 1:30 pm   
 
Don't thank me, I only got that from my own question about having clickable non-standard exits in my status bar.
Maelstrom was actually the one that gave me the answer.
http://forums.zuggsoft.com/phpbb/viewtopic.php?t=21046
_________________
http://www.Aardwolf.com
Reply with quote
DustyShouri
Novice


Joined: 29 Oct 2004
Posts: 34

PostPosted: Tue Feb 14, 2006 10:28 pm   
 
I have that same problem too, with it taking a few clicks before it actually works.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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 ;-)
_________________
http://www.Aardwolf.com
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net