Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: 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.
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Riesz
Novice


Joined: 16 May 2006
Posts: 35
Location: Plymouth, England

PostPosted: 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.
Reply with quote
Zugg
MASTER


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

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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