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
divinesnoop
Newbie


Joined: 09 Jan 2005
Posts: 5

PostPosted: Wed Jun 02, 2010 8:08 am   

variables on buttons
 
Building buttons with basic timers on cmud i ran into a problem. Randomly my variables start to fail to display the value of the variable, but rather display the variable name (eg. @prot_timer).
Started with the trial of 2.37 then tried to see if it worked properly in the beta, but same problem in both.
Here's the XML of one of the failing buttons:
Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <button name="avatar_regeneration_button" type="Toggle" autosize="false" width="120" height="23" toolbar="2" inset="true" color="black" textcolor="red" priority="152">
    <caption>AR off</caption>
    <expr>%eval(@snoop_avatar_regeneration_time > -1)</expr>
    <button color="black" textcolor="lime">
      <caption>AR @snoop_avatar_regeneration_time / @avatar_regeneration_default_time</caption>
    </button>
  </button>
</cmud>

Anyone know if there's anything i can do to fix this? Perhaps i'm just tired and missed something obvious, but don't think so.
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jun 02, 2010 4:24 pm   
 
Where are the variables located? Are they in the same package and class as the buttons, or somewhere else? If just the name of the variable is displayed in the button caption, that means the button cannot access the variable. Meaning that the variable is either in a disabled class or in some other package the button can't see.
Reply with quote
divinesnoop
Newbie


Joined: 09 Jan 2005
Posts: 5

PostPosted: Wed Jun 02, 2010 4:46 pm   
 
I've created all the variables with the same trigger, so they should be (and are) in the same class and package as far as i can see.
The thing is they did work at one point, but iirc some of them stopped working after i accidently closed cmud. I still have one "identical"
button working as it should. If I do #SHOW var the value displays correctly, but it isn't working on the buttons.

*Edit*
As I said I have one button that work properly, and even when i tried to use the variable from that button to display on another, it didn't
work but rather just displayed the variable name.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Jun 02, 2010 11:41 pm   
 
Have you actually checked whether the variables are still enabled, and whatever classes they are in are enabled, as Zugg said?

Do you have multiple windows? If so, are your buttons defined in a different window from your variables?
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