|
Bajed Novice
Joined: 15 Aug 2004 Posts: 33
|
Posted: Tue May 19, 2009 6:54 am
Variable Question |
How would I reference a variable where part of the variable name is based on another variable?
For example:
Variable_1: 2
Variable_2: something
I want to access Variable_[Variable_1] and have that return the contents of Variable_2, if that makes sense.
Thanks! |
|
|
|
Bajed Novice
Joined: 15 Aug 2004 Posts: 33
|
Posted: Tue May 19, 2009 6:57 am |
A better example of what I want to do would be:
Variables:
@myvar: N
@something_X: blah
@something_Y: blah
@something_Z: blah
where Variable_A is equal to either X, Y, or Z... which I have set based on other things in the script.
I want to basically access @something_@myvar |
|
|
|
Bajed Novice
Joined: 15 Aug 2004 Posts: 33
|
Posted: Tue May 19, 2009 7:00 am |
Nevermind! I realized it would be
@{something_@{myvar}} |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue May 19, 2009 4:51 pm |
Also, please remember to post normal questions about using CMUD to the regular CMUD Discussion Forum. This forum is for reporting problems with the latest Beta version of CMUD.
|
|
|
|
|
|