Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: 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...
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: 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
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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