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
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Tue Jan 08, 2008 7:09 pm   

[2.18] Disabled Prompt Variables
 
If I set some variables in Options -> Session -> Prompt, CMUD will create these variables. Ok.

But if I disable those variables in the Package Editor, CMUD will duplicate those variables for each line of prompt received!
So, after some time, you cold have thousands of these variables :-)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jan 08, 2008 7:32 pm   
 
Well, I'm not sure what else you expect CMUD to do. If the variables are disabled, then CMUD doesn't see them. So when it received your prompt, it creates the variables just as you told it too. You really shouldn't be disabling those variables if you are using the automatic Prompt feature.
Reply with quote
frasten
Beginner


Joined: 06 Jan 2006
Posts: 24

PostPosted: Tue Jan 08, 2008 7:52 pm   
 
That's ok. But should it be a correct behaviour?
I agree that what CMUD does now has got a sense, but this could bring to memory leaks...
Maybe it could update the variable's value, leaving it disabled. Or simply do nothing, if the variabile is disabled.
Thank you for your reply Smile
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Jan 08, 2008 8:25 pm   
 
If there is one set that's disabled and another set that isn't, shouldn't it update the set that isn't rather than creating yet another set of variables?
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jan 08, 2008 9:42 pm   
 
Well yes, if there is a set that is still enabled that it should be updating that set. But I got the impression from the original poster that they had some sort of script that kept disabling the variables. If the variable is enabled and it's not getting updated, then let me know because that's definitely a problem.

Edited: Although I can certainly see where having duplicate variables of the same name will really confuse CMUD. The CMUD hash table can only point to a single variable with a given name, so if a duplicate gets set, I don't know what will happen. Again, this is pretty minor...I can't think of why you'd ever want to disable your prompt variables in the first place.
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