EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Unread 02-28-2022, 11:48 PM
Regn Regn is offline
A Young Mystail Rat
 
Join Date: Dec 2013
Server: Everfrost
Posts: 7
Default Math help

I'm trying to figure out why I can't do basic math.

HealthAmount and WardAmount are variables.
WardAmount uses event OnTextChanged.
Test is display.
Code:
<Text Name="HealthAmount" Text="0.000" DynamicData="/GameData.Stats.HealthRange" Visible="false" />
<Text Name="WardAmount" Text="0.000" DynamicData="/GameData.Maintained.Spell_1.AmountRemaining" Visible="false" OnTextChanged="..." />
<Text Name="Test" Text="0.0" ... />
Code:
 Name="WardAmount" OnTextChanged="

	HasHealth = Parent.HealthAmount.Text &gt; 0
	HasWard = Parent.WardAmount.Text &gt; 0

	HealthValue = HasHealth ? Parent.HealthAmount.Text : 0
	WardValue = HasWard ? Parent.WardAmount.Text : 0

	Parent.Test.Text = HealthValue + WardValue"
If I set Parent.Test.Text = HealthValue, I will see my total health.
If I set Parent.Test.Text = WardValue, I will see the ward amount (I must make sure to be unbuffed so that it finds "Spell_1").

If I instead use A="5" and B="6" and OnTextChanged="Parent.Test.Text = (A) + (B)", it works, but I don't know how to use variables in A="" and B="".

Does anyone know whether this is a string conversion, null, or syntax error?

I'm guessing this is because /GameData.Stats.HealthRange contains a comma.

Last edited by Regn : 03-01-2022 at 12:49 AM.
Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:01 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI