|
Tsara Newbie
Joined: 25 Feb 2006 Posts: 2
|
Posted: Sun Feb 26, 2006 3:42 pm
Dynamically accessing string members. |
Not sure if I have the words correct but it boils down to this.
#ALIAS price {#sh @PriceMapping.@stat} "test"
#VAR PriceMapping {f39=5|f41=6} {_nodef} "test"
#VAR stat {f39} {_nodef} "test"
Not sure what the (_nodef} thingie means but the purpose of the script is to value the price of an item after you grabbed its stats in the variable stat. Its value is lookep up in the table Pricemapping with the variable stat as key.
Problem is zmud doesnt view @PriceMapping.@stat as a member of Pricemapping but rather as one empty variable a dot and the value of the variable stat.
Please help we are getting desperate.
Edit Actaully I long since past the stadium of getting desperate |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Feb 26, 2006 5:07 pm |
First PriceMapping has to be setup as a record variable. It looks like an export for it that way, but make sure that is the actual setup.
#ALIAS price {#sh @{PriceMapping.@stat}} "test" |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Tsara Newbie
Joined: 25 Feb 2006 Posts: 2
|
Posted: Sun Feb 26, 2006 5:31 pm |
just using
#sh @{PriceMapping.@stat}
doesnt work how do i setup pricemapping as a record variable? (its static btw) |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Feb 26, 2006 5:36 pm |
Dunno if that works, but wouldn't it just be easier to use %db()?
#show %db(@Pricemapper, @stat) |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|