|
mortie Wanderer
Joined: 26 Sep 2002 Posts: 73 Location: United Kingdom
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
|
mortie Wanderer
Joined: 26 Sep 2002 Posts: 73 Location: United Kingdom
|
Posted: Mon Jan 24, 2005 7:10 pm |
Implemented both suggestions of code change and working nicely.
Thanks LightBulb! |
|
|
|
|
|