 |
divinesnoop Newbie
Joined: 09 Jan 2005 Posts: 5
|
Posted: 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. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: 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.
|
|
|
 |
divinesnoop Newbie
Joined: 09 Jan 2005 Posts: 5
|
Posted: 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. |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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? |
|
|
 |
|
|