|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Oct 14, 2006 10:24 pm
Data Records #VAR vs #ADDKEY |
in Zmud I could use
#VAR test.record1 {Value 1}
#VAR test.record2 {Value 2}
And it would correctly add the values to a database record
In Cmud when I do this it adds them correctly but makes the variable a string (expanded) in the data record format.
IE the value of test is record1=Value 1|record2=Value 2 (it can still be accessed as a datarecord just the display in the settings editor)
This only happens when I use #VAR if I use the shorthand form
test.record1=value1
test.record2=value2
It is correctly formated and displayed as a data record in the settings editor
If I do #VAR then the shorthand form it is correctly formated but if I then do another #VAR it goes back to expanded string. |
|
|
|
Riesz Novice
Joined: 16 May 2006 Posts: 35 Location: Plymouth, England
|
Posted: Sun Oct 15, 2006 7:56 am |
Hmm... I suppose a minor gripe of mine was that addkeys (and additems as well) don't use the same syntax as for Var for creating a new variable. You could specify the desired class for the creation lof a new variable with Var, which isn't supported for AddKey and AddItem. To do this, I had to create blank variables with Var first so they were in the correct place. Maybe this is how it was intended and I was just being lazy, it isn't such a big deal. Just a throwout idea though.
|
|
_________________ Elaria, Lusternia. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 16, 2006 4:26 pm |
This was discussed a while ago when CMUD was first released. It's related to how the new #VAR command works.
Basically, if you put {} around something, that forces it to be treated as an expanded string, like in zMUD. If you put () around the value, that forces it to be evaluated as an expression. If you put "" around the value, that forces it to be treated as a literal string.
And yes, #addkey and #additem are not intended for variable "creation". You should always create the variable first with #VAR or var=value or #NEWVAR before using them.
Edited: Nevermind...I didn't read your post clearly. Looks like database variables are *working* correctly, but you are just talking about how it's being displayed in the settings editor. That's a bug in the settings editor and has been added to the list. |
|
|
|
|
|