Doing a < or > in an if within UI

Forum for posting custom UIs, portions of UIs, and HUD stuff using MQ's enhancements.

Moderator: MacroQuest Developers

Charisa
a hill giant
a hill giant
Posts: 165
Joined: Tue Apr 06, 2004 5:38 pm

Doing a < or > in an if within UI

Post by Charisa » Thu Sep 29, 2005 12:05 am

Well lol after 2 hours battling it I figured out the error I am getting doing this is the UI is parsing out the > or the < and complaining about non matching tags.

Does anyone know of any way to do a comparison for < or > within an ${If[]} statement within the UI? I was going to add some information depending on how low someone's hit points got but well I can't do it the way I thought I could.

Any help appreciated.

Thanks

P.S. yes I realize I can do this within the HUd but relyig on my roommate who is always moving UI's to move the stuff to the right spot would be a pain in the butt, so was trying to do it in the UI itself but doesn't appear to be a way)

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Post by htw » Thu Sep 29, 2005 5:05 am

Yes, those chars are reserved. Assuming whatever bastardized version of xml parsing is used (and will recognize them), you represent < by < and > by >. You can also "escape" the code, so it is not parsed.

Code: Select all

<equation> myhp < 20 </equation>
If the parser recognizes the CDATA tag:

Code: Select all

<thistag1>
    <![CDATA[myhp < 20]]>
</thistag1>
htw