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
jat63
Wanderer


Joined: 22 Sep 2003
Posts: 53
Location: United Kingdom

PostPosted: Sat Aug 19, 2006 8:43 pm   

[1.05] Database variables
 
Do database variable work yet in v1.05? If so what is the syntax?

I have tried to use:
Code:
#VARIABLE A {}
#ADDKEY A {a=0|b=0}


To create the variable and then:
Code:
#IF (@A.a=1) {#ECHO Yes}

To access it but this gives a syntax error - what should the correct sytax be please?
Reply with quote
Zugg
MASTER


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

PostPosted: Sat Aug 19, 2006 9:33 pm   
 
Well, the correct syntax is:
Code:
#ADDKEY varname key value
#ADDKEY A a 0
#ADDKEY A b 0

Now, you are looking for the syntax for setting multiple values in a single command. This is something I haven't tested in CMUD. Your syntax for {a=0|b=0} seems like it should be fine, but it's probably something the new parser doesn't handle yet, since this was a wierd syntax unique to the ADDKEY command.

Your #IF syntax looks fine. Try putting a space around the = and see if that helps. But definitely report this as a bug.
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