 |
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Wed Nov 07, 2007 6:42 am
[2.10] Default variable values never being set |
This was a problem in 2.9 as well, not sure about earlier versions. For some reason I never got around to investigating it and bugging.
<var name="armb" usedef="true" id="980">
<default>lr</default>
</var>
<var name="tleftarm" usedef="true" id="756">
<default>1</default>
</var>
Those are two examples of variables that I have set to default values, and as you can see, "use default" is checked.
When I connect, any variables I have that should be reset to default values, unfortunately have a null value - as you can see right there.
Is this just me, or are others experiencing this? I installed 2.10 fresh, not as an upgrade from 2.9 |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Nov 07, 2007 12:09 pm |
I bugged this quite a while ago (1.x version), and the response I received explained how it would be a tricky solution because of how packages can be shared between multiple connections and you wouldn't want CMUD resetting variables that are in use elsewhere. Personally, I'm only using one connection and I have one package with several modules, so I'd be happy with variables resetting every time I connect, but I know others will need the correct solution to this problem. 
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Nov 07, 2007 4:54 pm |
I would be fine with variables not resetting onConnect, just as long as they have the right value on load. I think it is easy enough to use #RESET in the onConnect event to make them reset each connection. Also I never remember zMud resetting them with each connection.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Nov 07, 2007 6:00 pm |
This is actually already on the bug list, and yes, I am considering only setting variables to their defaults when the package is loaded and not when you reconnect.
But yes, there is currently a bug that is resetting variables to null values. |
|
|
 |
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Thu Nov 08, 2007 2:29 am |
Hmm, I tested the current behaviour before I posted the other thread (yesterday), and my variables were being reset to the default on connect, although I was testing with a variable that had a non-null default. So I can't replicate Caled's bug, but I can replicate the bug Zugg just posted above.
|
|
|
 |
|
|