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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Kosmo
Newbie


Joined: 06 Oct 2014
Posts: 3
Location: United States

PostPosted: Fri Sep 06, 2019 1:11 pm   

Variable Name from Variable Value
 
I am having trouble defining a variable name called from another variable value.

Per the help documentation, I should be able to do
Code:
#VA simple abc
#VA @simple def


To make a variable named "abc" with a value of "def".

However, when I do this in CMUD, the second line of code merely changes the "simple" variable's value to "def".


Is there some setting I have messed up, or is the documentation inaccurate on this issue?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4023
Location: Pensacola, FL, USA

PostPosted: Fri Sep 06, 2019 2:37 pm   
 
I believe the documentation is inaccurate as I am getting the same results
_________________
Discord: Shalimar#3679
Reply with quote
Kosmo
Newbie


Joined: 06 Oct 2014
Posts: 3
Location: United States

PostPosted: Fri Sep 06, 2019 3:22 pm   
 
Any other way to name a variable using the value of another variable?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4023
Location: Pensacola, FL, USA

PostPosted: Fri Sep 06, 2019 4:16 pm   
 
Run your variable call through an #EXEC, that will force the first variable to evaluate before it it is interpreted.
_________________
Discord: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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