About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
mortie
Wanderer


Joined: 26 Sep 2002
Posts: 73
Location: United Kingdom

PostPosted: Sun Jan 23, 2005 12:52 pm   

status window displaying a data record with <> charact
 
Hi,

I've been trying to get the status window to display a data record without doing any stripping etc.

The data record contains info as the following:-



Key=Playername Value=378 552 101 Sla <Water> |c 346| <clanname> <PK>

This is the script i use to display the results into the window.


#stw %null
#loopdb @pk_person_stats {
#stw + %key":"%repeat( " ", %eval( 15 - %len( %key)))%val
}

The info contained in the <> brackets gets stripped away from the output.

So i'm left with

378 552 101 Sla |c 346|

Can't seem to find a way to get it to ignore it. I've tried a couple of other methods but with no luck.

I could always use a diff character than <> which i may well do. Or even use #WIn instead of #STW. However, i was curious as to what the solution would be.

Thanks
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jan 23, 2005 4:00 pm   
 
In Prefs, on the MXP page uncheck 'Allow MXP in Status Window'

It shouldn't be necessary to continually rewrite the status window. This will give a similar display, but without the formatting spaces. It will update itself when variables change:
Code:
#STW {%expanddb( @pk_person_stats, %cr, ": ")}


To get the formatting, insert the spaces into the variable itself. I'm guessing that your variable entries come from a trigger so something like this.
Code:
#ADDK pk_person_stats {%1} {%repeat( " ",  15 - %len( %1))%2}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
mortie
Wanderer


Joined: 26 Sep 2002
Posts: 73
Location: United Kingdom

PostPosted: Mon Jan 24, 2005 7:10 pm   
 
Implemented both suggestions of code change and working nicely.

Thanks LightBulb!
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