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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
russ3z
Newbie


Joined: 18 Nov 2005
Posts: 5

PostPosted: Thu Feb 10, 2011 6:32 pm   

using #math on a variable variable
 
I am attempting to use a couple of temp variables to store certain values.

#CLASS {newtest}
#VAR pft {0} (variable to indicate what spell has just been cast)
#VAR tpft {0} (variable to concatenate a string "f" (for failure) and the string value of pft. in this case it gives "farmor" which is a variable i already have made)
#VAR farmor {0}
#TRIGGER {channel 'armor'} {pft = "armor"}
#TRIGGER {You lost control of Saidar!} {tpft = f@pft; #MATH @tpft @tpft+1}
#CLASS 0

So, I want to be able to operate on the farmor variable or any other so constructed without having to explicitly call it. All this works except for the last #MATH part, which just assigns a value of "farmor1" to the variable farmor, instead of making it a value of 1.

Sorry in advance if this doesn't make much sense, but any help would be most appreciated.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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