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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Sun Feb 06, 2011 5:21 pm   

Working on Dragonrealms XML vitals
 
I am admitting a lack of knowledge on alot of things. I keep plugging along. Believing that the only way to slay the XML beast (as I've heard Simtronics XML called), I figured the only way to strip out the information for a guage button through string manipulation. Here is the issue.

The XML feed is

<dialogData id='minivitals'><progressBar id='concentration' value='100' text='concentration 100%' left='75%' customText='t' top='0%' width='25%' height='100%'/></dialogData>

I use this trigger to to get the Arugument list
<dialogData id=($dialogid:'*>)</dialogData>.

It catches the information. It causes unstable results. Keep getting bug report dialogs, and using some of my knowledge I can cause a complete lockup of CMUD. Shocked I did some things trying to figure out the problem. Using #echo $dialogid causes a complete lockup of CMud. Using #echo %1 causes a long freeze that eventually lets up. I dumped all the code to extract the information from the argument list. The freeze goes away. If I check the debug MXP in prefrences, I get the full line

'minivitals'><progressBar id='concentration' value='62' text='concentration 62%' left='75%' customText='t' top='0%' width='25%' height='100%'/>

with it unchecked I get

'minivit (the sixteenth not symbol) followed by what ever text comes along with the line.

a new development with this is a small box at the bottom left corner of the session screen that flashes a word then stays there. As this is giving me a headache. I decided to ask people that know more about this than me. thanks for any response.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 07, 2011 2:10 pm   
 
Go into your options. Somewhere in there (I forget where) is a setting to display unknown MXP codes. Part of the problem could be that it is trying to interpret the <progressBar.../> as an MXP code when you #ECHO it.

For your gauge button, you probably only want to grab pieces of that XML code, rather than the big glop you are doing currently. I presume that what you have so far is merely a test stage? You might try grabbing the individual pieces you need, to see if you can get that to work better.
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Feb 07, 2011 4:47 pm   
 
thanks for the reply, judgeing from the views on this post there are people interested in the post, and the outcome. Would be nice to get all that brainpower together on this beast.

Yes, it's in the testing and discovering stage. It would be nice to see that unknown MXP it's trying to interpert. I've now got it extracting the two items I think I need, the Bar id, and the value. Was going to keep the rest of the garbage incase it proved useful to keep in the future. Some people are use to stormfront, and that may be helpful in giving them a look they are use too. Now, to find some documentation on how to use the #button command. The help file is lacking on how to do all the kind, options, etc. Get this past a test and into a working stage. Smile
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 07, 2011 4:54 pm   
 
The unknown MXP it's trying to interpret is <progressBar.../>. MXP is simply a species of XML. If you have MXP interpretation turned on (which it is by default), it will check every < > pair to see whether it might be MXP code. And also by default, anything which might be MXP codes (i.e. anything within < > pairs) which it does not understand are not displayed when you use #ECHO. That is controlled by the setting that I described.
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Feb 07, 2011 9:16 pm   
 
I've got it extracting the name of the bar, and the percentage. I put those into $barname and $barpercent. At the end of the script to extract the information I have.

$buttoncap = %concat($barname , $barpercent)
#bu $barname $buttoncap

I've done some reading and trying to plug stuff into #bu id cap {} {} {} and decided best to let someone who knows tell me how. I just want to set the button to gauge, value to $barpercent, max 100, low 50. It would be nice to know how to set the colors too, but maybe I ask to much. If anyone would help, thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Feb 07, 2011 10:05 pm   
 
instead of looking to the hideous many-headed monster that is #BUTTON, try #GAUGE.
_________________
EDIT: I didn't like my old signature
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Feb 07, 2011 10:45 pm   
 
Now that is something simpler, and it works! Thanks all
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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