|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Tue Feb 16, 2010 9:04 pm
button/guage |
i have 4 guages out of them
Code: |
<button type="Gauge" autopos="false" left="179" top="19" image="TRACK" inset="true" toolstyle="true" stack="true" color="#208000" textcolor="white" gaugelowcol="#0C0000" gaugebackcol="#070000" priority="9" id="168">
<caption>End %eval(100*@end_cur/@end_max)%</caption>
<expr>@end_cur</expr>
<gaugemax>@end_max</gaugemax>
<gaugelow>%eval( @end_max * 0.25)</gaugelow>
</button> |
that is the only one that does not work
this one works
Code: |
<button type="Gauge" autopos="false" left="179" image="PLUSR" inset="true" toolstyle="true" stack="true" color="#208000" textcolor="white" gaugelowcol="#0C0000" gaugebackcol="#070000" priority="10" id="167">
<caption>HP %eval(100*@hit_cur/@hit_max)%</caption>
<expr>@hit_cur</expr>
<gaugemax>@hit_max</gaugemax>
<gaugelow>%eval( @hit_max * 0.25 )</gaugelow>
</button>
|
nothing has changed just the vars i do not get why it is not working... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Feb 17, 2010 1:06 am |
Old bug that's been fixed in recent beta versions, I think. Essentially, CMud forgets all about the button and just simply stops updating the caption.
A quick copy-paste should reset it, but for good measure you may want to use the export/import process on the package to rule out corruption. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Wed Feb 17, 2010 1:58 am |
i figured it out i had set end to an alias and forgot so the alias was messing it up for some reason ... and im using 3.14a
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Feb 17, 2010 2:12 pm |
If you were using the beta version, you should probably have posted in the Beta forum. At the very least, you should include the version number in the topic title or mention it in the original question.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Feb 17, 2010 5:19 pm |
Do not use %eval in your gauge expressions. For your Low Gauge expression, just use:
(@hit_max * 0.25)
directly. Same thing with the caption. The caption should be:
%concat( "HP ", (100*@hit_cur/@hit_max), "%")
Anytime you use %eval, you are passing a string value that is evaluated at runtime. This prevents the expression from being compiled, and therefore prevents CMUD from knowing which variables are being used by the gauge. CMUD needs to have the compiled variable data in order to automatically update the gauge when a variable is changed. |
|
|
|
|
|