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
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Wed May 16, 2007 8:36 am   

use of %eval in a button
 
put %eval((@timerstart - %secs)/1000) in a button... and i get a result like -34539

put it in a alias and run the alias and i get the correct result which is more like 300. any ideas why?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed May 16, 2007 3:02 pm   
 
Buttons don't like to expand more than one level. So you can expand a variable reference but not a function.

var=%eval((@timerstart - %secs)/1000)
Then place @var in the button label.

You could try using an expression trigger to set the variable or an alarm that goes off once a second to set it.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
adamwalker
Apprentice


Joined: 12 Mar 2005
Posts: 195

PostPosted: Thu May 17, 2007 5:46 pm   
 
hmmm. that does work..

problem is tho that i need to update @var every few seconds to get an accurate number in the button. any idea how i could do that? other then something horrific like a every second alarm
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu May 17, 2007 5:58 pm   
 
How are you getting the values that feed @var?
_________________
Asati di tempari!
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Fri May 18, 2007 12:58 pm   
 
The thing is just how often do you want it to update? If you don't need it to be extremely often you could place it in the prompt, AND make an alarm that fires every 30 seconds or so.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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