|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Tue Sep 26, 2006 7:16 am
variable question |
i'm wondering if it is possible to setup a variable like this
#var @glvl.@clvl %eval(@glvl.clvl+@gxprate)
basically creating a var that will be in the format of a.b, where a is @glvl from my hpbar and @clvl is control lvl from my hpbar, so it will look like 7.master 4343 and 7.amateur 435 and do the same when i get gl 8,9, 10, ect. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Tue Sep 26, 2006 12:24 pm |
in vars a . denotes a sub entry...errr...or something...it's a data record type thing.
is that what you wanted? or you just wanted the . as a placeholder? If so, then I don't think that ~. works, but feel free to try. if not then i'd suggest using a _ for the placeholder instead. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Sep 26, 2006 12:26 pm |
Use curly braces to force earlier expansion of your variables that you use to build your variable name. Off the top of my head (i.e., untested, so play with it if it doesn't work):
Code: |
#VAR @{glvl.@clvl} %eval(@{glvl.@clvl} + @gxprate) |
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Tue Sep 26, 2006 7:00 pm |
larkin was on to what i wanted to do, and i can't find any such way to do it, even after trying your method larkin
|
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Sep 27, 2006 11:15 am |
I did say you might have to play with it. Try variations on the curly braces until you find a combination that works. Maybe @{glvl.@{clvl}} would work?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Sep 27, 2006 10:10 pm |
The problem is likely in how your are attempting to name the variables. All variables are supposed to start with a letter followed by any combination of alpha-numeric characters, allowing only the underscore symbol. The use of a period indicates one of a few things: a key to a record variable, an item number in a stringlist, or an element number in an array. So I think you need to really rethink how your looking to name the variable and also how your looking to store the data.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Sep 28, 2006 2:52 pm |
*cough* kinda like what I said :-)..sorta..maybe...*shrug*...wtf do i know :-)
|
|
|
|
|
|