|
Lina Novice
Joined: 12 Oct 2006 Posts: 49
|
Posted: Fri Oct 05, 2007 4:47 am
[2.04] Question about database variables |
I'm not sure if I am simply doing something wrong and thinking too much of zmud or if it's a bug, but here goes..
I made a pipe_coltsfoot variables which keeps records of id, puffs and status.
Now, I'm trying to make an alias which will call the id from this variable to use.
Alias name: light
Script: #if (%ismember( %1, coltsfoot|myrtle|faeleaf)) {~light @pipe_%1.id}
I've tried all kinds of things, but I cannot get it to work. help? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Oct 05, 2007 4:58 am |
You say zMUD, but you've posted in the CMUD forum. Which did you mean? For now, I'll assume you meant CMUD.
This sort of implicit concatenation can cause problems. You need to tell CMUD what's part of the variable name and what isn't, like so:
~light @{pipe_%1.id}
an even better way would be
~light @{%concat("pipe_",%1,".id")}
but that'll be slower and probably not necessary. |
|
|
|
Lina Novice
Joined: 12 Oct 2006 Posts: 49
|
Posted: Fri Oct 05, 2007 5:02 am |
ah! yes...I tried " " and ' ' and <> and all kinds of things, but not curly braces .. thanks , see I knew it was just me.
and yes. my sentence says zmud, because I was working around what I knew how to get things working in zmud, but hasnt worked for me in cmud. It'll take me some time to pick it up I guess. Thanks though. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Oct 05, 2007 12:44 pm |
Ah, sorry, I misread your post (it was almost 6am at the time). Glad that's helped :)
|
|
|
|
|
|