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
Guest






PostPosted: Sat Feb 15, 2014 3:29 pm   

Gauges not correctly updating when accessing data via a function
 
First, please forgive me if this turns out to be a repost. I imagine others have encountered this issue before, but I was unable to find any threads discussing the specific issue I've been facing. I've recently upgraded from zMUD to CMUD after using the former for ~15 years, as certain features of zMUD don't work as it seems they should, which prevented me from implementing a fairly major usability feature. The settings I was using provided some fairly complex functionality and made copious use of database variables for data storage, many of which were generated and managed dynamically through a collection of function variables. It is my intention to retain this general structure/design with CMUD, for reasons of maintainability.

The specific problem I have encountered is that CMUD gauges do not seem to update when using functions to access values stored as values within a database record. If I call these values directly via %int({dbvar.key}), it will update correctly. However, there are a number of instances where this design will not work, particularly when updating gauges to monitor group members' health & buff status. If instead I call the values using a @func(dbvar,key) syntax, and implement a function which simply accesses the relevant dbvar and returns the value with #return %int({dbvar.key}), the gauges cease updating and will not change until I manually modify and save the gauge itself through the package editor window. This also remains true when I create the variable using #varfunc instead of making a proper CMUD function.

zMUD also behaved strangely when using values stored within dbvars, however I was able to implement a workaround by simply making a gauge for each buttons panel displaying a simple counter, which was incremented via a simple updater function I had execute whenever changes to gauge data were detected in the mud output. Replicating this functionality in CMUD did not solve the issue as it did in zMUD, and I'm at a loss as to what I should try next. Anyone have any suggestions that might help?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Feb 15, 2014 8:33 pm   
 
That's exactly what the #update command was added for.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Feb 15, 2014 8:34 pm   
 
It is probably in your best interests to review the design of your script, but in the meantime you can check out the #UPDATE command.
_________________
EDIT: I didn't like my old signature
Reply with quote
Spirit
Newbie


Joined: 01 Mar 2014
Posts: 4

PostPosted: Sat Mar 01, 2014 9:01 pm   
 
Euphoric.plan here, sorry for the delay in response. The forum hiccuped and my old account was eventually destroyed in the process, so I've chosen a new username.

Thanks guys, #update was exactly what I needed.
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